google / google/python-fire

bugs when use pytorch

Đang mở
#206 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
28.2k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Traceback (most recent call last):
File "multilabel/runners/resnet_runner.py", line 26, in
main()
File "multilabel/runners/resnet_runner.py", line 22, in main
fire.Fire(resnet50)
File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 560, in _Fire
treatment='callable')
File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 675, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'x'

When I rewrite pytorch nn.Module, I use x as params to override forward function. This bugs appear.
I have test. If I do not use Fire, it works well.
I suppose that because fire did not support this kind of override? Or someone can tell me how to fix it.
Thanks.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.