Sorry if this was too trivial but I want to get the output of the neural network I trained for the specific inputs that I feed. The notation I often saw was of TrainedNet[inp] kind. But when I use this I do not get the output but the result given in figure below:
1 Answer
The issue here is that you used NetTrain[mynet, data, All]
, which returns a NetTrainResultsObject
. From a NetTrainResultsObject
, you can use ["TrainedNet"]
(eg, results["TrainedNet"]
) to get the network, or you can retrain your network with NetTrain[mynet, data]
which will only return the trained net.
Further reading: https://reference.wolfram.com/language/ref/NetTrainResultsObject.html https://reference.wolfram.com/language/ref/NetTrain.html
NetTrain
invocation? I suspect you didNetTrain[mynet, data, All]
- if you try something likeresults["TrainedNet"][inp]
that may work. To avoid this, you can just doNetTrain[mynet, data]
(ie, noAll
). $\endgroup$