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

Colab notebook does not work #73

Open
geekmangnu opened this issue Feb 25, 2021 · 5 comments
Open

Colab notebook does not work #73

geekmangnu opened this issue Feb 25, 2021 · 5 comments

Comments

@geekmangnu
Copy link

geekmangnu commented Feb 25, 2021

Hi, because most people do not have suitable GPU colab file is important. Current colab notebook run gives following error below. It seems because of python version which currently is 3.7 and async is reserved word for python 3.7. Changing pose_model.py file by replacing async to non_blocking resolves it.

Traceback (most recent call last):
File "demo.py", line 10, in
opt = ValOptions().parse()
File "/content/Global-Flow-Local-Attention/options/base_options.py", line 74, in parse
opt = self.gather_options()
File "/content/Global-Flow-Local-Attention/options/base_options.py", line 60, in gather_options
model_option_set = model.get_option_setter(opt.model)
File "/content/Global-Flow-Local-Attention/model/init.py", line 25, in get_option_setter
model = find_model_using_name(model_name)
File "/content/Global-Flow-Local-Attention/model/init.py", line 10, in find_model_using_name
modellib = importlib.import_module(model_file_name)
File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 724, in exec_module
File "", line 860, in get_code
File "", line 791, in source_to_code
File "", line 219, in _call_with_frames_removed
File "/content/Global-Flow-Local-Attention/model/pose_model.py", line 103
self.input_P1 = input_P1.cuda(self.gpu_ids[0], async=True)
^
SyntaxError: invalid syntax

after this fix it gives another error which seems setup related as follow:

Loading data pairs ...
Loading data pairs finished ...
dataset [FashionDataset] of size 41 was created
val images = 41
Network [PoseGenerator] was created. Total number of parameters: 14.0474 million. To see the architecture, do print(network).
THCudaCheck FAIL file=/pytorch/aten/src/THC/generic/THCTensorMathPairwise.cu line=225 error=11 : invalid argument
Traceback (most recent call last):
File "demo.py", line 15, in
model = create_model(opt)
File "/content/Global-Flow-Local-Attention/model/init.py", line 32, in create_model
instance = model(opt)
File "/content/Global-Flow-Local-Attention/model/pose_model.py", line 64, in init
norm='instance', activation='LeakyReLU', extractor_kz=opt.kernel_size)
File "/content/Global-Flow-Local-Attention/model/networks/init.py", line 37, in define_g
return create_network(netG_cls, opt, **parameter_dic)
File "/content/Global-Flow-Local-Attention/model/networks/init.py", line 28, in create_network
net.init_weights(opt.init_type)
File "/content/Global-Flow-Local-Attention/model/networks/base_network.py", line 55, in init_weights
self.apply(init_func)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 242, in apply
module.apply(fn)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 242, in apply
module.apply(fn)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 242, in apply
module.apply(fn)
[Previous line repeated 1 more time]
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 243, in apply
fn(self)
File "/content/Global-Flow-Local-Attention/model/networks/base_network.py", line 47, in init_func
init.orthogonal_(m.weight.data, gain=gain)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/init.py", line 356, in orthogonal_
q, r = torch.qr(flattened)
RuntimeError: cuda runtime error (11) : invalid argument at /pytorch/aten/src/THC/generic/THCTensorMathPairwise.cu:225

@radhakrishr36
Copy link

I face the same issues ..How to resolve this error?

RuntimeError: cuda runtime error (11) : invalid argument at /pytorch/aten/src/THC/generic/THCTensorMathPairwise.cu:225

@RenYurui
Copy link
Owner

RenYurui commented Mar 3, 2021

Sorry for the delay!
I think it is related to the CUDA version. The Colab CUDA has been improved for the latest.
I will fix this as soon as possible.

@geekmangnu
Copy link
Author

Sorry for the delay!
I think it is related to the CUDA version. The Colab CUDA has been improved for the latest.
I will fix this as soon as possible.

Thank you looking forward to try on colab.

@whuzjw
Copy link

whuzjw commented Aug 5, 2021

Sorry for the delay!
I think it is related to the CUDA version. The Colab CUDA has been improved for the latest.
I will fix this as soon as possible.

Looking forward to the new version

@amrzv
Copy link

amrzv commented Jan 23, 2024

ERROR: Could not find a version that satisfies the requirement torch==1.0.0 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2)
ERROR: No matching distribution found for torch==1.0.0

image

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

5 participants