Oracle Developers
Published in

Oracle Developers

Waslley Souza

Jun 13, 2018

3 min read

Using Oracle Storage Cloud with Tensorflow

Do you know Tensorflow? TensorFlow is an open source software library for high performance numerical computation. Maybe nowadays it is the most famous library used for Machine Learning and Deep Learning projects. This kind of solution is responsible for projects like autonomous vehicles and facial recognition.

There are many tutorials about Tensorflow and one of my favorites is the Transfer Learning. Transfer Learning is a technique that allows us to reuse an already trained model in a related task. In other words, we can use a model trained to recognize cats and dogs to recognize human faces. Transfer Learning is a good choice for people that have a computer without a GPU (my case =D).

In an object recognition project, we need to train or retrain our model with a lot of images, and a great storage cloud can be helpful.

In this blog post, you will learn how to use images stored in Oracle Cloud Object Storage Classic to train your models.

Please, look at this blog post to learn how to send your images to Oracle Cloud Object Storage Classic: Upload files to Oracle Object Storage Classic with FTM CLI.

TensorFlow has a good tutorial called “TensorFlow for Poets” and I used it to create this project. Download the files from Github.

git clone

Inside the tf4poets-with-oracle-cloud folder, start the Jupyter Notebook.

jupyter notebook tf4poets-with-oracle-cloud.ipynb

The Notebook is very simple.
In the third line, I’ve created a code that lists all the images in the local and cloud folders. If you add or remove an image in the cloud folder, this code will update it in your local folder.

When you run the fourth line for the first time, all images are downloaded and saved into the tf_files folder.

The last two lines execute the original scripts.
This code retrains the model using the images.

This code classifies an image. In this case, it tries to identify the type of flower.

Have a good time!

Originally published at on May 31, 2018.

Aggregation of articles from Oracle engineers, Groundbreaker Ambassadors, Oracle ACEs, and Java Champions on all things Oracle technology. The views expressed are those of the authors and not necessarily of Oracle.