Oracle OCI Data Science | training a Keras Image Classification model with a few OCI notebooks of different shapes and sizes


Oracle Cloud Infrastructure (OCI) Data Science is a fully managed and serverless platform for data science teams to build, train, and manage machine learning models using OCI.

In this post we are creating notebook sessions with different compute shapes and train a Keras image classification model example published here in keras.io

After creating the different notebook sessions and installing Tensorflow, Keras and other packages needed we have run a couple of epochs of the train model phase of the image classification Keras code exmaple mentioned above.

Down here you can find the results:

mac:
 Epoch 1/50
 586/586 [==============================] - 13255s 23s/step - loss: 0.6394 - accuracy: 0.6513 - val_loss: 0.9312 - val_accuracy: 0.5543
 Epoch 2/50
  76/586 [==>………………………] - ETA: 48:58 - loss: 0.5338 - accuracy: 0.7340
 VM.Standard.E2.8:
 Epoch 1/50
 586/586 [==============================] - 1454s 2s/step - loss: 0.6918 - accuracy: 0.6141 - val_loss: 0.8010 - val_accuracy: 0.5735
 Epoch 2/50
 586/586 [==============================] - 1455s 2s/step - loss: 0.5118 - accuracy: 0.7469 - val_loss: 0.4616 - val_accuracy: 0.7943
 Epoch 3/50
  13/586 […………………………] - ETA: 22:12 - loss: 0.5206 - accuracy: 0.7715
 VM.Standard2.24:
 Epoch 1/50
 586/586 [==============================] - 571s 970ms/step - loss: 0.7036 - accuracy: 0.6008 - val_loss: 0.6687 - val_accuracy: 0.6292
 Epoch 2/50
 586/586 [==============================] - 569s 970ms/step - loss: 0.5071 - accuracy: 0.7502 - val_loss: 0.4967 - val_accuracy: 0.7856
 Epoch 3/50
 586/586 [==============================] - 569s 971ms/step - loss: 0.4030 - accuracy: 0.8151 - val_loss: 0.3557 - val_accuracy: 0.8411
 Epoch 4/50
  14/586 […………………………] - ETA: 8:52 - loss: 0.3534 - accuracy: 0.8443
 gpu 2.1
 Epoch 1/50
 586/586 [==============================] - 775s 1s/step - loss: 0.6922 - accuracy: 0.6149 - val_loss: 0.8216 - val_accuracy: 0.5463
 Epoch 2/50
 586/586 [==============================] - 771s 1s/step - loss: 0.5016 - accuracy: 0.7538 - val_loss: 0.5507 - val_accuracy: 0.7561
 Epoch 3/50
  82/586 [===>……………………..] - ETA: 10:30 - loss: 0.4451 - accuracy: 0.7918
SHAPETIME SPENT 1ST EPOCH (SECS)CORES/GPUs
VM.Standard.E2.814548 / 0
VM.Standard2.2457124 / 0
VM gpu 2.177512 / 1
Macbook pro core i7 year 201713255
Disclaimer: This is not a benchmark, result haven’t been validated

In future post maybe we’ll try bare metal shapes.

That’s all, hope it helps! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.