| 1101 | } |
| 1102 | |
| 1103 | tensorflow::Status ConvertSqueezeOperator( |
| 1104 | const NodeDef& node, const TensorFlowImportFlags& tf_import_flags, |
| 1105 | const ModelFlags& model_flags, Model* model) { |
| 1106 | CHECK_EQ(node.op(), "Squeeze"); |
| 1107 | TF_QCHECK_OK(CheckInputsCount(node, tf_import_flags, 1)); |
| 1108 | auto* op = new SqueezeOperator; |
| 1109 | op->inputs.push_back(node.input(0)); |
| 1110 | op->outputs.push_back(node.name()); |
| 1111 | |
| 1112 | // When omitted we are to squeeze all dimensions == 1. |
| 1113 | if (HasAttr(node, "squeeze_dims")) { |
| 1114 | const auto& squeeze_dims = GetListAttr(node, "squeeze_dims"); |
| 1115 | for (int i = 0; i < squeeze_dims.i_size(); ++i) { |
| 1116 | op->squeeze_dims.push_back(squeeze_dims.i(i)); |
| 1117 | } |
| 1118 | } |
| 1119 | |
| 1120 | model->operators.emplace_back(op); |
| 1121 | return tensorflow::Status::OK(); |
| 1122 | } |
| 1123 | |
| 1124 | tensorflow::Status ConvertSplitOperator( |
| 1125 | const NodeDef& node, const TensorFlowImportFlags& tf_import_flags, |
nothing calls this directly
no test coverage detected