Method 'forward' is not defined
See original GitHub issueI installed the module via
$ pip install deep-daze
and just tried the provided example with
$ imagine "a house in the forest"
but after it loaded something for a few minutes (the first time I run the command) it throws this error
Traceback (most recent call last):
File "/home/luca/anaconda3/bin/imagine", line 5, in <module>
from deep_daze.cli import main
File "/home/luca/anaconda3/lib/python3.7/site-packages/deep_daze/__init__.py", line 1, in <module>
from deep_daze.deep_daze import DeepDaze, Imagine
File "/home/luca/anaconda3/lib/python3.7/site-packages/deep_daze/deep_daze.py", line 39, in <module>
perceptor, normalize_image = load()
File "/home/luca/anaconda3/lib/python3.7/site-packages/deep_daze/clip.py", line 192, in load
model.apply(patch_device)
File "/home/luca/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 473, in apply
module.apply(fn)
File "/home/luca/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 473, in apply
module.apply(fn)
File "/home/luca/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 473, in apply
module.apply(fn)
[Previous line repeated 3 more times]
File "/home/luca/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 474, in apply
fn(self)
File "/home/luca/anaconda3/lib/python3.7/site-packages/deep_daze/clip.py", line 183, in patch_device
graphs = [module.graph] if hasattr(module, "graph") else []
File "/home/luca/anaconda3/lib/python3.7/site-packages/torch/jit/_script.py", line 449, in graph
return self._c._get_method("forward").graph
RuntimeError: Method 'forward' is not defined.
My system is:
Ubuntu 18.04.4 LTS GeForce RTX 2070 pytorch 1.7.1 python version 3.7.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
RuntimeError: Method 'forward' is not defined. #49 - GitHub
Hi, I need to use a nightly version of PyTorch in order to get GPU support for my RTX 3080, and am facing...
Read more >[pytorch Android] I got the error “Method 'forward' is not ...
[pytorch Android] I got the error “Method 'forward' is not defined.”, but I defined 'forward' function in my model. I implemented the resnet18 ......
Read more >Pytorch model training without using forward - Stack Overflow
My suspicion is PyTorch only able to propagate the gradient through the forward method. Some source says that forward is not that special...
Read more >Common issues and solutions - mypy 0.991 documentation
NameError : name "X" is not defined from forward references. TypeError: 'type' object is not subscriptable from types that are not generic at...
Read more >What's New In Python 3.10 — Python 3.11.1 documentation
They are used to forward the parameter types of one callable to another callable – a pattern commonly found in higher order functions...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it turns out the released OpenAI code has some issues with the JIT version https://github.com/openai/CLIP/issues/49 I’ve submitted a new issue asking for them to make CLIP pip-installable, and I’ll fix it so it uses the non-JIT version instead once they do https://github.com/openai/CLIP/issues/60
Yep, using the updated files worked for me. Thanks for being so responsive and quick to solving these issues!