1
$\begingroup$

In version 11.1 there is an additional signature for NetTrain:

enter image description here

But this only returns the property, how can I get the net and the list of properties I want?

Minimal example code:

data = {1 -> 2.2, 2 -> 3.8, 3 -> 6.4, 4 -> 9.1};
layer = LinearLayer[];
net = NetTrain[layer, data, 
  MeanAbsoluteLossLayer[], {"RoundLossList"}, Method -> "SGD"]
$\endgroup$

1 Answer 1

4
$\begingroup$

According to the documentation, "TrainedNet" returns the trained net, so I think this does what you want:

{net, roundLossList} = 
 NetTrain[layer, data, 
  MeanAbsoluteLossLayer[], {"TrainedNet", "RoundLossList"}, 
  Method -> "SGD"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.