MATLAB Answers


save the neural network output "net" to matfile

Asked by Elysi Cochin on 16 Mar 2013

i wanted to save the neural network output "net" to matfile..... is it possible to do so.... i did like this....

    dbFeatures(kk) = net;
    kk = kk + 1;

when i process all the images...

i save the dbFeatures as

 save dbFeatures dbFeatures

but i'm getting error as

    ??? The following error occurred converting from network to double:
    Error using ==> double
    Conversion to double from network is not possible.
    Error in ==> TrainDataset at 135
        dbFeatures(kk) = net;

please can someone rectify it for me....



No products are associated with this question.

1 Answer

Answer by Greg Heath
on 16 Mar 2013
 Accepted answer

I don't know why you are using the term 'features' for describing a net. Nets can be thought of as structures with different sizes. Therefore try using cells:

savednets{kk} = net; . . .

save savednets

However, check if you can load the nets individually, e.g.,

load savednets{2}

If not, save them individually by name

save net2


Hope this helps

Thank you for formally accepting my answer


  1 Comment

thank u sir.... its working....

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!