For a general introduction to writing custom PyTorch models, have a look at this tutorial 3.
To convert the TF model to PyTorch you should initialize all modules in the __init__ method of your custom model and use these modules in the forward method.
The layers are almost equivalently named, i.e. layers.BatchNormalization (assuming it’s working on temporal data) would correspond to nn.BatchNorm1d, while e.g. layers.Dense corresponds to nn.Linear.
The “functional” layers, such as layers.Concatenate can be applied in the forward pass of your model using:
input_3_concat = torch.cat((input_2, input_3))