when I run this class and call the method ALIGNet.forw(x), I get an error saying
"
AttributeError: ‘Net’ object has no attribute ‘forw’
Are there any suggestions as to why this is happening ?
class Net(nn.Module):
def init(self, grid_size):
super().__init__()

self.conv = get_conv(grid_size).to(DEVICE)

self.flatten = nn.Flatten().to(DEVICE)

self.linear1 = nn.Sequential(nn.Linear(80,20),nn.ReLU(),).to(DEVICE)

self.linear2 = nn.Linear(20, 2*grid_size*grid_size).to(DEVICE)

self.linear2.bias = nn.Parameter(init_grid(grid_size).view(-1)).to(DEVICE)

self.linear2.weight.data.fill_(float(0))

self.grid_offset_x = torch.tensor(float(0), requires_grad=True).to(DEVICE)

self.grid_offset_y = torch.tensor(float(0), requires_grad=True).to(DEVICE)

self.grid_offset_x = nn.Parameter(self.grid_offset_x)

self.grid_offset_y = nn.Parameter(self.grid_offset_y)

def forw(self, x):
print(f'X gradient: {get_tensor_info(x)}')

x = self.conv(x)

x = self.flatten(x)

x = self.linear1(x)

x = self.linear2(x)

print(f'X gradient: {get_tensor_info(x)}')

return x