Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytorch version problem? #21

Closed
huanghjA opened this issue Nov 25, 2020 · 4 comments
Closed

pytorch version problem? #21

huanghjA opened this issue Nov 25, 2020 · 4 comments

Comments

@huanghjA
Copy link

huanghjA commented Nov 25, 2020

  File "/home/hjhuang/weichen/t2vec/train.py", line 271, in train
    loss.backward()
  File "/home/hjhuang/anaconda3/envs/t2vec2/lib/python3.6/site-packages/torch/tensor.py", line 102, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/hjhuang/anaconda3/envs/t2vec2/lib/python3.6/site-packages/torch/autograd/__init__.py", line 90, in backward
    allow_unreachable=True)  # allow_unreachable flag
RuntimeError: CUDA error: device-side assert triggered
/opt/conda/conda-bld/pytorch_1544081127912/work/aten/src/THC/THCTensorScatterGather.cu:97: 
void THCudaTensor_gatherKernel(TensorInfo<Real, IndexType>, TensorInfo<Real, IndexType>, 
TensorInfo<long, IndexType>, int, IndexType) [with IndexType = unsigned int, Real = float, Dims = 2]: 
block: [13,0,0], thread: [385,0,0] Assertion `indexValue >= 0 && indexValue < src.sizes[dim]` failed.

I have run the Training after preprocess successfully and error occurred as above.

@boathit
Copy link
Owner

boathit commented Nov 26, 2020

The code was tested in Python 3.6 and PyTorch 1.1 and 1.3.

@huanghjA
Copy link
Author

huanghjA commented Nov 27, 2020

Thanks for your replying and i have successfully trained the model.
However, another problem occurred when creating test files with the command julia1.5.3 createTest.jl as following:

ERROR: LoadError: UndefVarError: jldopen not defined
Stacktrace:
 [1] loadregion!(::SpatialRegion, ::String) at /home/hjhuang/weichen/t2vec/preprocessing/SpatialRegionTools.jl:394
 [2] top-level scope at /home/hjhuang/weichen/t2vec/experiment/createTest.jl:15
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include(::Module, ::String) at ./Base.jl:368
 [5] exec_options(::Base.JLOptions) at ./client.jl:296
 [6] _start() at ./client.jl:506
in expression starting at /home/hjhuang/weichen/t2vec/experiment/createTest.jl:15

@boathit
Copy link
Owner

boathit commented Nov 27, 2020

It seems the script has been out of date, you may consider referring to this jupyter-notebook for testing.

@huanghjA
Copy link
Author

It works!
However, my python environment need to run conda activate XXX before python t2vec.py.
I can't solve this in Julia as I can skip this process by running in terminal.
Thank you for your help~

@huanghjA huanghjA closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants