0
$\begingroup$
learner = ConvLearner.pretrained(arch, md, ps=0.5) #dropout 50%
learner.load('ResNet34_256_1-2')
learner.fit(lr,1)
learner.save('ResNet34_256_1')

h5 file in load and save is having same size. Should it increase after training? How do I know that saved model is better than loaded on?

$\endgroup$
0
$\begingroup$

This is not surpising. h5 is the save file of the model's weights. The number of weights does not change before and after training (they are modified, though), therefore, your file should have the same size.

To know if your model after training is better, you have to measure it : you have to make predictions on a test set, and measure it, with usual metrics like accuracy or F score and so on. look at this to see usual metrics used in machine learning.

$\endgroup$
0
$\begingroup$

You're basically just modifying the weights you've loaded from the initial .h5 file during training, thus, you will end up with a file of same size but with different weights. The size of the file will change if you modify the construction of the network model in your code. Imagine a model having the weights

[0.1234567, 0.2345678, 0.3456789]

saved as an .h5 file. When you load this file together with the neural network model file (.json) and retrain it, it modifies the weights based on your training data. In our example, let's say the weights were modified into

[0.1212121, 0.2323321, 0.1221231]

When you save the modified weights into a new .h5 file, it will have the same size, just different values.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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