ypxie / pytorch-NeuCom

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

Error,,which pytorch version? #6

Closed SeekPoint closed 7 years ago

SeekPoint commented 7 years ago

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 "/usr/local/lib/python2.7/dist-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, 2, keepdim=True) TypeError: norm() got an unexpected keyword argument 'keepdim' mldl@mldlUB1604:~/ub16_prj/pytorch-NeuCom/tasks/Copy$

ypxie commented 7 years ago

use the master branch in the pytorch github. and install from source.