Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems like the line here would make a call to an uncaught exception in the current version of YoloV5 (this was fixed in a recent patch). The exception read: AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'. This solution fixed it, by manually ensuring the blank dict in the stack trace below was not passed.
The stack trace is as follows:
Traceback (most recent call last):
File "/content/SuperYOLO/test.py", line 139, in test
out, train_out = model(img,ir,input_mode=input_mode) #zjq inference and training outputs
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/content/SuperYOLO/models/SRyolo.py", line 196, in forward
y,features = self.forward_once(steam,'yolo', profile) #zjq
File "/content/SuperYOLO/models/SRyolo.py", line 232, in forward_once
x = m(x) # run
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/content/SuperYOLO/test.py", line 376, in
test(opt.data,
File "/content/SuperYOLO/test.py", line 141, in test
out, train_out,_ = model(img,ir,input_mode=input_mode) #zjq inference and training outputs
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/content/SuperYOLO/models/SRyolo.py", line 196, in forward
y,features = self.forward_once(steam,'yolo', profile) #zjq
File "/content/SuperYOLO/models/SRyolo.py", line 232, in forward_once
x = m(x) # run
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'