Because I need to employ nn.Replicate from torch, I tried the below
import torch
import torch.nn.functional as F
from torch.legacy import nn as nn
from torch.autograd import Variable

input = Variable(torch.rand(32,128,1,1))
replicate = nn.Replicate(nf = 32, dim = 3)
output = replicate(input)

But, I got the error message TypeError: ‘Replicate’ object is not callable
Can you tell me how I can use nn.Replicate ?