MATLAB: Neural network is saved as ‘struct’ instead of ‘network’

checkpointsneural networks

I am training a neural network to learn a function. Everything is going as expected. The only problem is that while storing checkpoints in train function, the network is stored as a 'struct' rather than 'network'. Because of which, when I load the network again and try to train it, following error is thrown by train function.
"Undefined function 'train' for input arguments of type 'struct'".
I have referred the documentation for storing and loading checkpoints. I am using 'fitnet' network.

Best Answer

Solution to this problem is very simple.
net = network(checkpoint.net);
It solved my problem.