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

TypeError: _AlternatingHighwayLSTMFunction.forward: ctx is not present #7

Open
zacharyWongZ opened this issue Jul 8, 2021 · 1 comment

Comments

@zacharyWongZ
Copy link

when i run "bash ./scripts/train_vctreenet.sh 5",and go error is :
hoping your help,thanks.
Traceback (most recent call last):
File "models/train_rels.py", line 24, in
from lib.rel_model import RelModel
File "/home/wang/VCTree-Scene-Graph-Generation/lib/rel_model.py", line 31, in
from lib.tree_lstm import tree_lstm, gen_tree, tree_utils
File "/home/wang/VCTree-Scene-Graph-Generation/lib/tree_lstm/tree_lstm.py", line 8, in
from lib.lstm.highway_lstm_cuda.alternating_highway_lstm import block_orthogonal
File "/home/wang/VCTree-Scene-Graph-Generation/lib/lstm/highway_lstm_cuda/alternating_highway_lstm.py", line 62, in
class _AlternatingHighwayLSTMFunction(Function):
File "/home/wang/VCTree-Scene-Graph-Generation/lib/lstm/highway_lstm_cuda/alternating_highway_lstm.py", line 79, in _AlternatingHighwayLSTMFunction
gates: torch.Tensor)-> Tuple[torch.Tensor, None]:
File "/home/wang/anaconda3/envs/VCTree/lib/python3.6/site-packages/overrides/overrides.py", line 88, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "/home/wang/anaconda3/envs/VCTree/lib/python3.6/site-packages/overrides/overrides.py", line 114, in _overrides
_validate_method(method, super_class, check_signature)
File "/home/wang/anaconda3/envs/VCTree/lib/python3.6/site-packages/overrides/overrides.py", line 135, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "/home/wang/anaconda3/envs/VCTree/lib/python3.6/site-packages/overrides/signature.py", line 95, in ensure_signature_is_compatible
super_sig, sub_sig, super_type_hints, sub_type_hints, is_static, method_name
File "/home/wang/anaconda3/envs/VCTree/lib/python3.6/site-packages/overrides/signature.py", line 137, in ensure_all_kwargs_defined_in_sub
raise TypeError(f"{method_name}: {name} is not present.")
TypeError: _AlternatingHighwayLSTMFunction.forward: ctx is not present

@moshuilanting
Copy link

I also encountered the same problem, which can be solved by installing the old version of overrides
pip install overrides==1.9

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