sls
sls copied to clipboard
How to use this optimizer in non linear regression NN ?
Hi. I have this NN model :
N, D_in, H, D_out = X.shape[0], X.shape[1], inh , Y.shape[1] ;
model = nn.Sequential(OrderedDict([ ('fc1', nn.Linear(D_in, H)),
('Tanh', nn.Tanh()),
('fc2', nn.Linear(H, D_out))]))
loss_fn = torch.nn.MSELoss(reduction='mean')
optimizer = *****
How set optimizer, in this case, and the train(and validation) loop ?