-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Training Abnormality #14184
Comments
@DaCheng1823 hello, Thank you for reaching out and providing the error details. It looks like there might be a mismatch in the channel dimensions during the model's forward pass. To help us diagnose the issue more effectively, could you please provide a minimum reproducible example of your code? This will allow us to better understand the context and configuration you're using. You can find guidelines on how to create a reproducible example here. Additionally, please ensure that you are using the latest version of the Ultralytics package and dependencies. Sometimes, issues are resolved in newer releases. Looking forward to your response so we can assist you further! |
Hello @DaCheng1823, Thank you for providing the details and the screenshot. It appears there might be a configuration issue in the model file, leading to the channel mismatch error. To help us diagnose the issue more effectively, could you please provide a minimum reproducible example of your code? This will allow us to better understand the context and configuration you're using. You can find guidelines on how to create a reproducible example here. Additionally, please ensure that you are using the latest version of the Ultralytics package and dependencies. Sometimes, issues are resolved in newer releases. Looking forward to your response so we can assist you further! 😊 |
class ConvNormLayer(nn.Module):
ResNet18、34class BasicBlock(nn.Module):
class Blocks(nn.Module):
|
Hello @DaCheng1823, Thank you for providing the details and the screenshots. It looks like the issue might be related to the specific configuration in your YAML file. When you removed the 'b', it worked fine, which suggests that there might be a bug or a misconfiguration related to that parameter. Regarding your memory issue, here are a few suggestions to help manage GPU memory usage:
Regarding your question about using RT-DETR as a baseline model: If you are using the RT-DETR network structure as described in the paper but modifying the parameters or making improvements, it is still valid to refer to RT-DETR as your baseline model. Just make sure to clearly document the changes and improvements you have made in your work. If you continue to experience issues, please provide a minimum reproducible example of your code here so we can assist you further. Feel free to reach out if you have any more questions or need further assistance! 😊 |
Hello @DaCheng1823, Thank you for your question! It looks like you're trying to dynamically instantiate a class based on a string value. You can achieve this by using Python's class Blocks(nn.Module):
def __init__(self, ch_in, ch_out, block, count, stage_num, act='relu', variant='b'):
super().__init__()
# Dynamically get the class from the string
block_class = globals()[block]
self.blocks = nn.ModuleList()
for i in range(count):
self.blocks.append(
block_class(
ch_in,
ch_out,
stride=2 if i == 0 and stage_num != 2 else 1,
shortcut=False if i == 0 else True,
variant=variant,
act=act)
)
if i == 0:
ch_in = ch_out * block_class.expansion
def forward(self, x):
out = x
for block in self.blocks:
out = block(out)
return out In this example, If you encounter any further issues, please provide a minimum reproducible example here to help us better understand and assist you. Feel free to reach out if you have any more questions! 😊 |
When I configured rt-detr, yolo printed out the model file but reported an error, reporting RuntimeError: Given groups=1, weight of size [128, 128, 3, 3], expected input[4, 256, 40, 40] to have 128 channels, but got 256 channels instead
The text was updated successfully, but these errors were encountered: