defforward(self, x): x = x.view(-1, 1000) x = F.relu(self.l1(x)) x = F.relu(self.l2(x)) x = F.relu(self.l3(x))
return self.l4(x).reshape(x.shape[0], 1, 1, 1000)
if __name__ == '__main__': model = DNN() s = torch.from_numpy(np.random.uniform(1, 5, 5000).reshape((5, 1, 1, 1000))) test = model.forward(torch.tensor(s, dtype=torch.float)) print(test)