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

Method MergeInput

tensorflow/core/framework/shape_inference.h:246–251  ·  view source on GitHub ↗

Merge the stored shape of the input in position idx with according to the following rules: - If the ShapeHandles are the same or is unknown, there will be no change. Otherwise if the stored shape is unknown, the new shape will be . - If both shapes are known, then they must have the same rank. - For any one dimension, if the values for that dimension in both shapes are know

Source from the content-addressed store, hash-verified

244 // This requires idx to be in the [0, num_inputs) range. If the merge is
245 // successful, return true. Return false otherwise.
246 bool MergeInput(int idx, ShapeHandle shape) {
247 ShapeHandle new_shape;
248 if (!Merge(inputs_[idx], shape, &new_shape).ok()) return false;
249 inputs_[idx] = new_shape;
250 return true;
251 }
252
253 // Relax the stored shape of the input in position idx with <shape> according
254 // to the following rules:

Callers 2

UpdateNodeMethod · 0.80
UpdateEdgeFunction · 0.80

Calls 2

MergeFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected