Is Imagenet_1k dataset enough to train Resnet50 model? - pytorch

I used nervana distiller to train resnet50 baseline model with imagenet_1k dataset.I've observed after 100 epochs, Top5 accuracy is about 10%.The validation accuracy remains zero for long step.

Related

Why my validation loss is always in a certain range of values?

I have been working with an convolutional autoencoder model. My encoder works fine but I am facing problem with my decoder. I have tried two different model.
For Model 1, training loss starts with 0.0436 and then after some epochs, the value was in range betweek 0.0280 and 0.0320. For validation, loss starts with 0.0306 and then after some epochs it the loss was in between 0.0275 and 0.0285.
For Model 2, the training loss decreased nicely but for the validation loss, it started with 0.2702 but after some epochs, the value was in range between 0.1450 and 0.1550.
I have used 15000 images from MS Coco, 'mse' as a loss function, 'Adam' as an optimizer with 0.00001 learning rate.
I have tried to use dropout layer, regularization but nothing is working. First I have tried it with 3000 images but later I increased the dataset into 15000 but still getting same problem. Total number of parameter of my model is 221,449,088.

How to get training accuracy for a model after completing the training process?

Is there a way to calculate the training accuracy after completing training process with Keras or Tensorflow?
model.history has all the information required.
For example, after running model for 5 epochs, you can access the loss and accuracy as follows
history=model.history.history
print(history)
{'loss': [0.2212433920122683, 0.097910506768773, 0.06874677832927555, 0.05441241036520029, 0.0430859369851804], 'accuracy': [0.9342333, 0.9698667, 0.97786665, 0.98211664, 0.9856]}
If you want to access loss and accuracy during model.evaluate, you can do as follows
history2 =model.evaluate(x_test, y_test)
print(history2) # output[0.07691180044879548, 0.9772]

Good Accuracy + Low Val_loss but very bad predictions

Going straight to the problem...
I am using Keras flow_from_directory to load the data for sound classification. Data_generator without any augmentation and shuffle =True and although most of my models have a very good accuracy (92%) and a small val_loss the confusion matrix shows that the model is not predicting the labels correctly
I have tried simple models and complex models with keras flow_from_directory and data_generator on UrbanSound8k dataset. Also tried batch normalization, bias and kernel regularizers to avoid overfitting.
The results look almost random.

Autoencoder bad reconstruction with low loss

[![enter image description here][2]][2]I train an autoencoder on my data. I define mse as loss function and it decrease to almost 0.005 for both train and validation during training so I conclude that the autoencoder trained perfectly but when I visualize my data, reconstructed data are not good and they are almost same for all data. I can not find out what is the problem?
Any suggestion??

Why training VGG16 CNN with images from scratch doesn't show up convergence?

I'm training the VGG16 CNN model with the "Imagenet" weights. There is no convergence when training the model from scratch. I have used a saved model after one epoch from another machine and started training on top of that. What could be the issue?
Using Learning Rate - 0.0001 / 0.001 ( Tried using both )
Training Images - RGB (1,00,000 images)
When training the model with Imagenet Pretrained weights from scratch there is no convergence. The training accuracy stands still (70%) after several epochs. The loss (88%) is not reducing.
When training the model with Imagenet Pretrained weights with a .h5 model ( Got from another machine after first epoch with the same configuration ) there was convergence. The accuracy raised epoch by epoch up to 90% & above and the loss reduced gradually.
What could be the actual reason?

Resources