for (auto& op : _net->op())
createMIRNodesFromOp(op);
- setIrNodeNames();
setGraphOutputs();
return _graph;
// For now, we assume that:
// - there is exactly one output;
// - the output is from the last layer.
+ _lastMIROp->setName("out");
_graph->markOutput(_lastMIROp);
}
-void Caffe2Importer::setIrNodeNames() {
- for (auto& item : _blobNameToIODescriptor)
- item.second.op->setName(item.first);
-}
-
const std::map<std::string, SupportedCaffe2OpType> Caffe2Importer::_operatorTypes = {
{"Add", SupportedCaffe2OpType::add},
{"AveragePool", SupportedCaffe2OpType::averagePool},
const OperatorDef& op) {
Shape window_shape = getWindowShape(op, inputs);
- int stride = getSingleArgument(op, "stride", 0);
+ int stride = getSingleArgument(op, "stride", 1);
Shape strides = Shape({stride, stride});
ops::PoolOp::PoolingType pool_type = ops::PoolOp::PoolingType::AVG;
const OperatorDef& op) {
Shape window_shape = getWindowShape(op, inputs);
- int stride = getSingleArgument(op, "stride", 0);
+ int stride = getSingleArgument(op, "stride", 1);
Shape strides = Shape({stride, stride});
ops::PoolOp::PoolingType pool_type = ops::PoolOp::PoolingType::MAX;