| 793 | } |
| 794 | |
| 795 | Status InferenceContext::MakeShapeFromShapeTensor(int input_idx, |
| 796 | ShapeHandle* out) { |
| 797 | ShapeHandle input_shape; |
| 798 | TF_RETURN_IF_ERROR(WithRank(input(input_idx), 1, &input_shape)); |
| 799 | |
| 800 | requested_input_tensor_as_partial_shape_[input_idx] = true; |
| 801 | if (input_idx < input_tensors_as_shapes_.size() && |
| 802 | input_tensors_as_shapes_[input_idx].IsSet() && |
| 803 | RankKnown(input_tensors_as_shapes_[input_idx])) { |
| 804 | *out = input_tensors_as_shapes_[input_idx]; |
| 805 | return Status::OK(); |
| 806 | } |
| 807 | |
| 808 | return InternalMakeShapeFromTensor( |
| 809 | false /* treat_unknown_scalar_tensor_as_unknown_shape */, |
| 810 | input_tensor(input_idx), input_shape, out); |
| 811 | } |
| 812 | |
| 813 | Status InferenceContext::MakeShapeFromTensor(const Tensor* t, |
| 814 | ShapeHandle tensor_shape, |