Hello
I’m working my way through the github tutorial and I have run into an error that I can not get passed. The error message that I recieve is “Module [CircleModelV0] is missing the required “forward” function” do any of you know what this means and what might be wrong with my code? thanks
class CircleModelV0(nn.Module):
def init(self):
super().init()
#2creating the layerscapable of handleing x inuts and y outputs
self.layer_1 = nn.Linear(in_features=2,out_features=5)
self.layer_2= nn.Linear(in_features=5,out_features=1)
#3 defining the forward method containing the forward pass computation
def forward(self, x):
#return the output layer_2, a single feature in the shape as y
return self.layer_2(self.layer_1(x))# first goes through layer 1 than the output of 1
#4 instantiate
model_0 = CircleModelV0().to(device)
model_0
untrained_preds = model_0(x_test.to(device))
print(f"Length of predictions{len(untrained_preds)}, shape: {untrained_preds.shape}“)
print(f"length of test samples:{len(y_test)}, shape: {y_test}”)
print(f"\nfirst 10 test predictions:\n{untrained_preds[:10]}“)
print(f”\nFirst 10 test lables:\n{y_test[:10]}")