Hi,
I'm working on siamese network (assume each branch is an Alexnet).
I get error here: parameters, gradParameters = net:getParameters() if I clone from pre-trained model (imagenet pretrained alexnet).
I don't see this error if I create the model from scratch (basically no cloning).
I looked at this potential solution of using nn.Containers() instead of nn.ParallelTable() and yes, sharing parameters works but I don't know how to feed 2 inputs parallel then.
model = nn.Sequential():add(nn.SplitTable(2)):add(nn.ParallelTable()):add(siamese):add(nn.PairwiseDistance) --> cannot share parameters, throws error
or
model = nn.Sequential():add(nn.SplitTable(2)):add(nn.Container()):add(siamese):add(nn.PairwiseDistance) --> can share parameters, but throws error while feeding data
Kindly help,
Thanks