You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Wangjuan,
When I tried HiCplus training process on GPU nodes, it shows an error after almost 24h. Here is the error message:
./Anaconda3/envs/plus/lib/python3.6/site-packages/torch/nn/modules/loss.py:431: UserWarning: Using a target size (torch.Size([80, 28, 28])) that is different to the input size (torch.Size([80, 1, 28, 28])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
0:00:00.000020
HiC version: 7
dividing, filtering and downsampling files...
(1379920, 1, 40, 40)
(1379920, 1, 40, 40)
start training...
(1379920, 1, 40, 40) (1379920, 28, 28)
Traceback (most recent call last):
File "./Anaconda3/envs/plus/bin/hicplus", line 4, in <module>
__import__('pkg_resources').run_script('hicplus==1.1.0', 'hicplus')
File "./Anaconda3/envs/plus/lib/python3.6/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "./envs/plus/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1462, in run_script
exec(code, namespace, namespace)
File "./Anaconda3/envs/plus/lib/python3.6/site-packages/hicplus-1.1.0-py3.6.egg/EGG-INFO/scripts/hicplus", line 70, in <module>
run()
File "./Anaconda3/envs/plus/lib/python3.6/site-packages/hicplus-1.1.0-py3.6.egg/EGG-INFO/scripts/hicplus", line 66, in run
args.func(args)
File "./Anaconda3/envs/plus/lib/python3.6/site-packages/hicplus-1.1.0-py3.6.egg/hicplus/train_models.py", line 38, in main
trainConvNet.train(lowres_sub,highres_sub,args.outmodel)
File "./Anaconda3/envs/plus/lib/python3.6/site-packages/hicplus-1.1.0-py3.6.egg/hicplus/trainConvNet.py", line 120, in train
running_loss += loss.data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
It seems that it should be a problem with PyTorch version. And here is a similar case
Do you know how to solve the problem? What PyTorch version are you using for the HiCPlus package?
Thanks!
The text was updated successfully, but these errors were encountered:
PanZiwei
changed the title
Install module "straw" before using
No GPU nodes available
Jan 7, 2020
PanZiwei
changed the title
No GPU nodes available
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
Jan 9, 2020
Finally fix the problem and my solution is below:
Change line 120 in File "./Anaconda3/envs/plus/lib/python3.6/site-packages/hicplus-1.1.0-py3.6.egg/hicplus/trainConvNet.py"
Change from running_loss += loss.data[0]
to running_loss += loss.data
The error reason: That's because in PyTorch>=0.5, the index of 0-dim tensor is invalid. The master branch is designed for PyTorch 0.4.1.
Hi Wangjuan,
When I tried HiCplus training process on GPU nodes, it shows an error after almost 24h. Here is the error message:
It seems that it should be a problem with PyTorch version. And here is a similar case
Do you know how to solve the problem? What PyTorch version are you using for the HiCPlus package?
Thanks!
The text was updated successfully, but these errors were encountered: