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

Function ScatterUpdateShape

tensorflow/core/ops/state_ops.cc:116–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114namespace {
115
116Status 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

Callers

nothing calls this directly

Calls 6

SubshapeMethod · 0.80
RankFunction · 0.50
inputMethod · 0.45
ConcatenateMethod · 0.45
MergeMethod · 0.45
set_outputMethod · 0.45

Tested by

no test coverage detected