-
Notifications
You must be signed in to change notification settings - Fork 87
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
How to extract intermediate features? #21
Comments
x = self.stem[0](x)
for stem_layer in self.stem[1:]:
if self.use_checkpoint:
x = checkpoint.checkpoint(stem_layer, x) # save memory
else:
x = stem_layer(x) https://github.com/DingXiaoH/RepLKNet-pytorch/blob/main/replknet.py#L259 |
Thank you for your reply. Following your suggestion, I changed my codes so that each submodule of the modulelist can be acquired. But it gives me another error as below
|
I think this error is not related to our model, and I guess it results from your runtime. Do you have a cuda runtime? You may test our model with cpu only. |
This problem may be caused by |
thx! I will have a try when I am not so busy. |
I am trying to make some changes to RepLKNet. So I seperate the network into several parts by using ‘.children’. My codes are shown below
Then it gives the error
It seems that the type of self_stem_block is nn.ModuleList(). So it does not have forward function.
Anyone knows how to extract intermediate features?
Any suggestion is appreciated.
The text was updated successfully, but these errors were encountered: