ONE - On-device Neural Engine
|
#include <caffe_op_creator.h>
Public Member Functions | |
CaffeOpCreator (mir::Graph *g) | |
std::vector< mir::Operation::Output * > | convertInput (const caffe::LayerParameter &layer) |
std::vector< mir::Operation::Output * > | convertConvolution (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertInnerProduct (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertConcat (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertPooling (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSoftmax (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertReshape (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
Converts Caffe Reshape layer to Model IR Reshape operation. | |
std::vector< mir::Operation::Output * > | convertReLU (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertScale (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertBatchNorm (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertDropout (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertDeconvolution (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertELU (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertEmbed (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSigmoid (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertTanH (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertEltwise (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertSplit (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
std::vector< mir::Operation::Output * > | convertLSTM (const caffe::LayerParameter &layer, const std::vector< mir::Operation::Output * > &inputs) |
void | checkConvolution (const caffe::LayerParameter &layer, std::set< std::string > &problems_ops_set) |
void | checkPooling (const caffe::LayerParameter &layer, std::set< std::string > &problems_ops_set) |
void | checkReshape (const caffe::LayerParameter &layer, std::set< std::string > &problems_ops_set) |
void | checkBatchNorm (const caffe::LayerParameter &layer, std::set< std::string > &problems_ops_set) |
void | checkLSTM (const caffe::LayerParameter &layer, std::set< std::string > &problems_ops_set) |
Definition at line 34 of file caffe_op_creator.h.
|
inlineexplicit |
Definition at line 37 of file caffe_op_creator.h.
void mir_caffe::CaffeOpCreator::checkBatchNorm | ( | const caffe::LayerParameter & | layer, |
std::set< std::string > & | problems_ops_set | ||
) |
Definition at line 533 of file caffe_op_creator.cpp.
void mir_caffe::CaffeOpCreator::checkConvolution | ( | const caffe::LayerParameter & | layer, |
std::set< std::string > & | problems_ops_set | ||
) |
Definition at line 221 of file caffe_op_creator.cpp.
void mir_caffe::CaffeOpCreator::checkLSTM | ( | const caffe::LayerParameter & | layer, |
std::set< std::string > & | problems_ops_set | ||
) |
Definition at line 702 of file caffe_op_creator.cpp.
void mir_caffe::CaffeOpCreator::checkPooling | ( | const caffe::LayerParameter & | layer, |
std::set< std::string > & | problems_ops_set | ||
) |
Definition at line 383 of file caffe_op_creator.cpp.
void mir_caffe::CaffeOpCreator::checkReshape | ( | const caffe::LayerParameter & | layer, |
std::set< std::string > & | problems_ops_set | ||
) |
Definition at line 460 of file caffe_op_creator.cpp.
References mir::Shape::dim(), and mir::Shape::rank().
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertBatchNorm | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 544 of file caffe_op_creator.cpp.
References mir::Tensor< T >::at(), mir::Tensor< T >::getShape(), and mir_caffe::input.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertConcat | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 320 of file caffe_op_creator.cpp.
References mir_caffe::concat.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertConvolution | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 239 of file caffe_op_creator.cpp.
References mir_caffe::bias, mir::Conv2DOpAttributes::data_format, and mir::Conv2DOpAttributes::num_groups.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertDeconvolution | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 267 of file caffe_op_creator.cpp.
References mir_caffe::bias, and mir::Deconv2DOpAttributes::data_format.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertDropout | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 586 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertEltwise | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 638 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertELU | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 594 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertEmbed | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 604 of file caffe_op_creator.cpp.
References mir_caffe::bias, and mir_caffe::data.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertInnerProduct | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 298 of file caffe_op_creator.cpp.
References mir_caffe::bias.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertInput | ( | const caffe::LayerParameter & | layer | ) |
Definition at line 144 of file caffe_op_creator.cpp.
References mir_caffe::input.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertLSTM | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 771 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertPooling | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 400 of file caffe_op_creator.cpp.
References mir::AvgPool2DOpAttributes::data_format, mir::MaxPool2DOpAttributes::data_format, and mir_caffe::input.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertReLU | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 496 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertReshape | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Converts Caffe Reshape layer to Model IR Reshape operation.
Definition at line 485 of file caffe_op_creator.cpp.
References mir_caffe::reshape.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertScale | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 514 of file caffe_op_creator.cpp.
References mir_caffe::bias, and mir_caffe::scale.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertSigmoid | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 622 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertSoftmax | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 436 of file caffe_op_creator.cpp.
References mir_caffe::input, and mir_caffe::softmax.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertSplit | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |
Definition at line 695 of file caffe_op_creator.cpp.
std::vector< mir::Operation::Output * > mir_caffe::CaffeOpCreator::convertTanH | ( | const caffe::LayerParameter & | layer, |
const std::vector< mir::Operation::Output * > & | inputs | ||
) |