NotImplementedError: Module [Detect] is missing the required "forward" function #1035
Unanswered
nassimasad
asked this question in
Q&A
Replies: 1 comment
-
Hi @nassimasad , Can you share your full code? That would really help in troubleshooting this question. Otherwise, have you made sure that your For example: import torch
import torch.nn as nn
import torch.nn.functional as F
class SimpleNet(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(SimpleNet, self).__init__()
self.hidden = nn.Linear(input_size, hidden_size)
self.output = nn.Linear(hidden_size, output_size)
# Define a forward method
def forward(self, x):
x = F.relu(self.hidden(x))
x = self.output(x)
return x |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
"C:\Users\User1\PycharmProjects\pythonProject\venv\Lib\site-packages\torch\nn\modules\module.py", line 352, in _forward_unimplemented
how i can fix please this problem such as i don;t have any class named Detect in the file module.py
Beta Was this translation helpful? Give feedback.
All reactions