You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Loading the a w6 config model using the below code:
model = create_yolov7_model(
architecture="yolov7-w6", num_classes=num_classes, pretrained=pretrained
)
gives you an error in the constructor of the Yolov7DetectionHeadWithAux class. The cause of the error is that use_implicit_modules is being passed to this classes constructor, which is not expecting this arg. To fix this, you can remove the True from the config on line 470 of the model_configs.py, but that exposes a second error.
When use_implicit_modules is defaulted, the forward pass of the network throws an index out of bounds error. I have patched this by defaulting the parameter to true when called from the Yolov7DetectionHeadWithAux constructor, but im not sure if this is the correct approach
The text was updated successfully, but these errors were encountered:
I just ran into the same problem. Fixed it by adding the use_implicit_modules argument to the constructor of Yolov7DetectionHeadWithAux so it matches Yolov7DetectionHead, and passing it on to the call to super().__init__ as in the below diff.
No need to change the configs.
Hi,
Loading the a w6 config model using the below code:
gives you an error in the constructor of the
Yolov7DetectionHeadWithAux
class. The cause of the error is thatuse_implicit_modules
is being passed to this classes constructor, which is not expecting this arg. To fix this, you can remove theTrue
from the config on line 470 of the model_configs.py, but that exposes a second error.When use_implicit_modules is defaulted, the forward pass of the network throws an index out of bounds error. I have patched this by defaulting the parameter to true when called from the
Yolov7DetectionHeadWithAux
constructor, but im not sure if this is the correct approachThe text was updated successfully, but these errors were encountered: