what is the version of the python and torch ?
I have some bugs when I run the tester.py.
for exmple,
Traceback (most recent call last):
File "tester.py", line 502, in
sampler.generate()
File "tester.py", line 144, in generate
sampled_ids = self.word_model.sample(topic, start_tokens)
File "/home/cheng/perl5/Medical-Report-Generation-master/utils/models.py", line 386, in sample
sampled_ids[:, 0] = start_tokens.view(-1, )
File "/usr/local/lib/python3.6/site-packages/torch/tensor.py", line 452, in array
return self.numpy().astype(dtype, copy=False)
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
what is the version of the python and torch ? I have some bugs when I run the tester.py. for exmple,
Traceback (most recent call last): File "tester.py", line 502, in
sampler.generate()
File "tester.py", line 144, in generate
sampled_ids = self.word_model.sample(topic, start_tokens)
File "/home/cheng/perl5/Medical-Report-Generation-master/utils/models.py", line 386, in sample
sampled_ids[:, 0] = start_tokens.view(-1, )
File "/usr/local/lib/python3.6/site-packages/torch/tensor.py", line 452, in array
return self.numpy().astype(dtype, copy=False)
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.