×
Community Blog How to Use Caffe Deep Learning Framework for Image Classification

How to Use Caffe Deep Learning Framework for Image Classification

In this article, you will get some information on how to use Caffe deep learning framework for image classification.

Caffe is a deep learning framework, with which you can complete image classification model training for deep learning by editing configuration files. In this blog, we will introduce how to process image classification with Caffe in Alibaba Cloud Machine Learning Platform for AI.

Users of Alibaba Cloud Machine Learning Platform for AI can directly enter the following paths in the Data Source Path field of deep learning components:

Testing data: oss://dl-images.oss-cn-shanghai-internal.aliyuncs.com/cifar10/caffe/images/cifar10_test_image_list.txt

Training data: oss://dl-images.oss-cn-shanghai-internal.aliyuncs.com/cifar10/caffe/images/cifar10_train_image_list.txt

Then you can follow the steps below:

  1. Convert the jpg format as the Caffe framework of deep learning currently only supports certain formats.
  2. Set up the Caffe configuration files.
  3. Upload the Solver and Net files to OSS, drag and drop the Caffe component to the canvas, and connect the component to the data source.
  4. Set the Solver OSS Path to the OSS path of the uploaded Solver file and then click Run.
  5. Image classification model files are generated in the model storage path on OSS.

For details, please go to Alibaba Cloud Machine Learning Platform for AI: Image Classification by Caffe.

Related Blog Posts

Cooperation with NVIDIA GPU Cloud (NGC) at The Computing Conference

At the 2018 Computing Conference Shenzhen Summit on March 28, Alibaba Cloud announced the cooperation with NVIDIA GPU Cloud (NGC). Now, developers can download the NVIDIA GPU Cloud image from the Alibaba Cloud Marketplace and run NGC containers to use the NVIDIA GPU computing platform on Alibaba Cloud.

NGC can help developers access deep learning containers for free. Deep learning frameworks, including Caffe, Caffe2, CNTK, MXNet, TensorFlow, Theano, and Torch, are pre-integrated, tested, and optimized for NVIDIA GPU, removing the need for manual integration.

Ali-Perseus: Unified and Distributed Communication Framework for Deep Learning

In this article, we discuss how Ali-Perseus can help create a highly optimized and unified distributed communication framework for deep learning on Alibaba Cloud.

Because Caffe provides relatively primitive distributed support and is not modular, support for Caffe is relatively more difficult compared with the three other frameworks. The support for the three preceding frameworks does not require any changes to the framework code, except few modifications to MXNet. However, we need to make many modifications to the Caffe framework, which mainly include the following:

  1. Change the single-process and multi-GPU model to the single-process and single-GPU model and launch training on multiple machines and GPUs by using MPI.
  2. Use the APIs of the Ali-Perseus framework to merge gradients.
  3. It is required to construct a callback mechanism to allow the Ali-Perseus communication framework to notice the Caffe framework that all the gradients in the entire batch have completed communication.

Ali-Perseus also needs to add proper implementations of Caffe. Finally, after the integration, Ali-Perseus can support multiple machines and machines in Caffe.

Related Documenation

Deploy an NGC on gn5 instances

As a deep learning ecosystem from NVIDIA, NVIDIA GPU CLOUD (NGC) allows developers to access the deep learning software stack free of charge and is fit for creating a deep learning development environment.

At present, NGC has been fully deployed in the gn5 instances. The NGC website provides images of different versions of the current mainstream deep learning frameworks (such as Caffe, Caffe2, CNTK, MxNet, TensorFlow, Theano, and Torch). You can select the desired image to build the environment. By taking the TensorFlow deep learning framework for example, this article describes how to build an NGC environment on gn5 instances.

Caffe - Deep Learning

Caffe is a lightweight, scalable, and fast deep learning framework developed by Berkeley AI Research (BAIR) and by community contributors. This is a basic introduction for Caffe in deep learning.

Related Products

Machine Learning Platform for AI

Machine Learning Platform for AI provides end-to-end machine learning services, including data processing, feature engineering, model training, model prediction, and model evaluation. Machine Learning Platform for AI combines all of these services to make AI more accessible than ever.

Elastic Compute Service

Alibaba Cloud Elastic Compute Service (ECS) provides fast memory and the latest Intel CPUs to help you to power your cloud applications and achieve faster results with low latency. All ECS instances come with Anti-DDoS protection to safeguard your data and applications from DDoS and Trojan attacks. Now NGC for deep learning has been deployed in the gn5 instances on ECS.

1 1 1
Share on

Alibaba Clouder

2,599 posts | 764 followers

You may also like

Comments

Dikky Ryan Pratama June 26, 2023 at 12:44 am

Awesome!