I don’t think nn.Replicate exists in pytorch:
In [3]: torch.nn.Replicate
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-c0b9108e265b> in <module>()
----> 1 torch.nn.Replicate

AttributeError: module 'torch.nn' has no attribute 'Replicate'

Could you post a link to the the lua torch nn.Replicate (I’m not familiar with what it does).