MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TensorToDef

Function TensorToDef

tensorflow/lite/delegates/gpu/cl/api.cc:519–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517};
518
519TensorObjectDef TensorToDef(const Tensor& tensor) {
520 TensorObjectDef def;
521 def.dimensions.b = 1;
522 def.dimensions.h = tensor.Height();
523 def.dimensions.w = tensor.Width();
524 def.dimensions.c = tensor.Channels();
525 def.object_def.data_layout = ToDataLayout(tensor.StorageType());
526 def.object_def.data_type = tensor.DataType();
527 def.object_def.object_type = ToObjectType(tensor.StorageType());
528 def.object_def.user_provided = false;
529 return def;
530}
531
532class InferenceBuilderImpl : public InferenceBuilder {
533 public:

Callers 1

LinkTensorsMethod · 0.85

Calls 7

ToDataLayoutFunction · 0.85
ToObjectTypeFunction · 0.85
HeightMethod · 0.80
WidthMethod · 0.80
ChannelsMethod · 0.80
StorageTypeMethod · 0.80
DataTypeMethod · 0.45

Tested by

no test coverage detected