Edit Caffe model for training
Before adding a Caffe model to IBM Spectrum Conductor Deep Learning Impact, edit the model to enable some deep learning capabilities.
Using Caffe with IBM Spectrum Conductor Deep Learning Impact you
have the following training engine options:
- Single node
- Distributed training with Caffe
- Distributed training with IBM Fabric
Regardless of the training engine that you want to use, the Caffe definition files must be named
as follows:
- solver.prototxt: Caffe solver definition
- train_test.prototxt: Caffe train model definition
- inference.prototxt: Caffe inference model definition
Now, depending on the training engine that you want to use, IBM Spectrum Conductor Deep Learning Impact automatically does some conversions for known compatibility issues and parameters. For others, you must make some modifications to the definition files themselves. For a single node Caffe model, you can use Caffe as-is without making additional changes that are specific to IBM Spectrum Conductor Deep Learning Impact. For distributed training engines, additional changes must be made.
Although there are three different training engines for a Caffe model, inference is run using
single node Caffe. The training model, train_test.prototxt, uses an LMDB data
source and the inference model, inference.prototxt, uses
Input type of data layer which has input parameter to match the exact input
data shape. Here is an
example:
layer {
name: "data"
type: "input"
top: "data"
# input shape must be the same as in train network
input_param ( shape: { dim: 32 dim: 3 dim: 224 dim: 224 } }
}
For
additional examples of modifications, see sample Caffe models available on IBM Cloud.