Closed ducha-aiki closed 7 years ago
@ducha-aiki tensorflow version doesn't converge at all. I suggest you to use Pytorch which replicates results. Then you could try to share weights.
@edgarriba thanks. I have tried to run pytorch "as is" from https://github.com/edgarriba/examples/tree/master/triplet
and it fails with error:
0it [00:00, ?it/s]Traceback (most recent call last): File "./main.py", line 392, in
main() File "./main.py", line 288, in main train(train_loader, model, optimizer, epoch) File "./main.py", line 305, in train out_a, out_p, out_n = model(data_a), model(data_p), model(data_n) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call result = self.forward(*input, kwargs) File "./main.py", line 223, in forward x = self.features(x) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call result = self.forward(*input, *kwargs) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward input = module(input) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call result = self.forward(input, kwargs) File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/conv.py", line 237, in forward self.padding, self.dilation, self.groups) File "/usr/local/lib/python2.7/dist-packages/torch/nn/functional.py", line 40, in conv2d return f(input, weight, bias) RuntimeError: CHECK_ARG(input->nDimension == output->nDimension) failed at torch/csrc/cudnn/Conv.cpp:275
@edgarriba I have sent two PR to make it works, please look at them
Provided tensorflow variant is great, but it doesn`t work with t7 weights :(