| 114 | namespace { |
| 115 | |
| 116 | Status ScatterUpdateShape(InferenceContext* c) { |
| 117 | ShapeHandle var_shape = c->input(0); |
| 118 | ShapeHandle indices_shape = c->input(1); |
| 119 | |
| 120 | ShapeHandle unused_updates_shape; |
| 121 | ShapeHandle concat; |
| 122 | ShapeHandle var_subshape; |
| 123 | TF_RETURN_IF_ERROR(c->Subshape(var_shape, 1, &var_subshape)); |
| 124 | TF_RETURN_IF_ERROR(c->Concatenate(indices_shape, var_subshape, &concat)); |
| 125 | TF_RETURN_IF_ERROR( |
| 126 | InferenceContext::Rank(c->input(2)) == 0 |
| 127 | ? Status::OK() |
| 128 | : c->Merge(c->input(2), concat, &unused_updates_shape)); |
| 129 | |
| 130 | c->set_output(0, var_shape); |
| 131 | return Status::OK(); |
| 132 | } |
| 133 | |
| 134 | } // namespace |
| 135 |
nothing calls this directly
no test coverage detected