To be able to use Caffe models in Caffe2, we also need to understand the model file formats that Caffe2 can import. Just like Caffe, Caffe2 also uses Protobuf for serialization and deserialization of its model files. Caffe2 imports a trained model from two files:
- The structure of the neural network stored as a predict_net.pb file or as a predict_net.pbtxt file
- The weights of the operators of the neural network stored as a init_net.pb file