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
| 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 |