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

Function GetElementShapeFromInput

tensorflow/core/kernels/list_kernels.cc:166–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166Status GetElementShapeFromInput(OpKernelContext* c,
167 const TensorList& tensor_list, int index,
168 PartialTensorShape* element_shape) {
169 TF_RETURN_IF_ERROR(TensorShapeFromTensor(c->input(index), element_shape));
170 // Check that `element_shape` and `tensor_list.element_shape` are
171 // compatible and store the merged shape in `element_shape`.
172 PartialTensorShape tmp = *element_shape;
173 TF_RETURN_IF_ERROR(tmp.MergeWith(tensor_list.element_shape, element_shape));
174 return Status::OK();
175}
176
177Status GetInputList(OpKernelContext* c, int index, const TensorList** list) {
178 if (!TensorShapeUtils::IsScalar(c->input(index).shape())) {

Callers 5

ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85

Calls 3

TensorShapeFromTensorFunction · 0.85
MergeWithMethod · 0.80
inputMethod · 0.45

Tested by

no test coverage detected