ypxie / pytorch-NeuCom

Pytorch implementation of DeepMind's differentiable neural computer paper.
94 stars 15 forks source link

TypeError: norm received an invalid combination of arguments - got (int, bool), but expected one of: #7

Open SeekPoint opened 7 years ago

SeekPoint commented 7 years ago

(VENVpytorch2) mldl@mldlUB1604:~/ub16prj/pytorch-NeuCom/tasks/Copy$ python train.py Using CUDA. Iteration 0/100000Traceback (most recent call last): File "train.py", line 177, in output, = ncomputer(input_data) File "/home/mldl/ub16_prj/VENV_host/VENV_pytorch2/VENVpytorch2/local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 206, in call result = self.forward(*input, **kwargs) File "../../neucom/dnc.py", line 108, in forward interface['erase_vector'] File "../../neucom/memory.py", line 384, in write lookup_weight = self.get_content_address(memory_matrix, key, strength) File "../../neucom/memory.py", line 78, in get_content_address cos_dist = cosine_distance(memory_matrix, query_keys) File "../../neucom/utils.py", line 154, in cosine_distance memory_norm = torch.norm(memory_matrix, 2, dim=True) File "/home/mldl/ub16_prj/VENV_host/VENV_pytorch2/VENVpytorch2/local/lib/python2.7/site-packages/torch/autograd/variable.py", line 596, in norm return Norm(p, dim)(self) File "/home/mldl/ub16_prj/VENV_host/VENV_pytorch2/VENVpytorch2/local/lib/python2.7/site-packages/torch/autograd/_functions/reduce.py", line 192, in forward output = input.norm(self.norm_type, self.dim) TypeError: norm received an invalid combination of arguments - got (int, bool), but expected one of:

(VENVpytorch2) mldl@mldlUB1604:~/ub16_prj/pytorch-NeuCom/tasks/Copy$

ypxie commented 7 years ago

Please use the master branch of pytorch.

SeekPoint commented 7 years ago

@ypxie sure, I just retry with the pytorch builting from source code

still the same error