KaihuaTang / VCTree-Scene-Graph-Generation

Code for the Scene Graph Generation part of CVPR 2019 oral paper: "Learning to Compose Dynamic Tree Structures for Visual Contexts"
MIT License
121 stars 15 forks source link

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

Open zacharyWongZ opened 3 years ago

zacharyWongZ commented 3 years ago

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 commented 3 years ago

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