thanks Arul. Unfortunately it is a bit proprietary with many modules and hence it would be difficult to share. What are you particularly looking for? currently when I print model.fc.weight after initializing the model for example if the dense layer is named fc, each run of the program the weights are different.
This does not happen if say I had a predefined ordereddict with that seed. But this I notice only when incrementally adding on to the ordered dictionary and instantiating the model after the for loop.
As a pseudo sample, imagine a model with just Conv2d, flatten and Linear.
the for loop would look like this,
ordereddict = {} 
prev_output_size = 3
for layer in layer_list:
        ordereddict = OrderedDict(ordereddict.items() + constructmodule(layer,prev_output_size)
        # instantiate a temp model here to know the output size from the layer
        tempmodel = nn.Sequential(ordereddict)
        prev_output_size = tempmodel(torch.rand(1,3,5,5)).size()

constructmodule will return a nn.module depending on the layer.
at the end of the loop I do this,
torch.manual_seed(1)
finalmodel = nn.Sequential(orderedict)
print(finalmodel.fc.weight) # this is different each time