MCPcopy Create free account
hub / github.com/OAID/Tengine / LoadFIFOQueue

Function LoadFIFOQueue

tengine-module/plugin/serializer/tensorflow/tf_serializer.cpp:3163–3196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3161// }
3162
3163static bool LoadFIFOQueue(TFNode* tf_node, TFGraph& tf_graph, StaticGraph* graph)
3164{
3165 StaticNode* node = tf_node->static_node;
3166
3167 /* get shape */
3168 const tensorflow::NodeDef* node_def = tf_node->pb_defs[0];
3169
3170 tensorflow::AttrValue value;
3171
3172 if(GetAttrValue(node_def, "shapes", value))
3173 {
3174 if(value.has_list())
3175 {
3176 const tensorflow::TensorShapeProto& shapes = value.list().shape(0);
3177 int dim_size = shapes.dim_size();
3178
3179 std::vector<int> dims(dim_size);
3180
3181 for(int i = 0; i < dim_size; i++)
3182 {
3183 dims[i] = shapes.dim(i).size();
3184 }
3185
3186 SetTensorDim(tf_node->static_tensor, dims);
3187 }
3188 }
3189
3190 StaticOp* op = CreateStaticOp(graph, "InputOp");
3191 SetNodeOp(node, op);
3192
3193 AddGraphInputNode(graph, node);
3194
3195 return true;
3196}
3197
3198static bool LoadReshape(TFNode* tf_node, TFGraph& tf_graph, StaticGraph* graph)
3199{

Callers

nothing calls this directly

Calls 6

GetAttrValueFunction · 0.85
SetTensorDimFunction · 0.85
CreateStaticOpFunction · 0.85
SetNodeOpFunction · 0.85
AddGraphInputNodeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected