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

Method RelaxInput

tensorflow/core/framework/shape_inference.h:278–286  ·  view source on GitHub ↗

Relax the stored shape of the input in position idx with according to the following rules: - If the ShapeHandles are the same then the stored shape will be returned. - If either of the ShapeHandles are unknown, then a new UnknownShape will be returned. A new shape must be returned because we cannot claim that the resulting shape is necessarily the same as either of the input shapes. - If

Source from the content-addressed store, hash-verified

276 // successful and the new shape differs from the old one, store the new
277 // shape and return true. Return false otherwise.
278 bool RelaxInput(int idx, ShapeHandle shape) {
279 ShapeHandle new_shape;
280 Relax(inputs_[idx], shape, &new_shape);
281 if (inputs_[idx].SameHandle(new_shape)) {
282 return false;
283 }
284 inputs_[idx] = new_shape;
285 return true;
286 }
287
288 void SetInput(int idx, ShapeHandle shape) { inputs_[idx] = shape; }
289

Callers 1

UpdateNodeMethod · 0.80

Calls 1

SameHandleMethod · 0.45

Tested by

no test coverage detected