| 953 | } |
| 954 | |
| 955 | Status InferenceContext::MakeShapeFromShapeProto(const TensorShapeProto& proto, |
| 956 | ShapeHandle* out) { |
| 957 | *out = nullptr; |
| 958 | TF_RETURN_IF_ERROR(PartialTensorShape::IsValidShape(proto)); |
| 959 | PartialTensorShape partial_shape(proto); |
| 960 | return MakeShapeFromPartialTensorShape(partial_shape, out); |
| 961 | } |
| 962 | |
| 963 | Status InferenceContext::GetScalarFromTensor(const Tensor* t, int64* val) { |
| 964 | // Caller must ensure that <t> is not NULL. |
no outgoing calls