Copies all dimensions from the given generic shape into specific shape. It requires shape to have all axis defined in the given StrongShape. For example: - If this shape is OHWI but given shape is OIHW, Adopt will copy all dimensions and return true. - If this shape is OIHW but input shape is HW, Adopt will copy H and W dimensions and return true, but if this shape is HW and given shape OIHW, then
| 481 | // |
| 482 | // @return false if generic shape is not compatible. |
| 483 | bool Adopt(const Shape& shape) { |
| 484 | return DispatchByLayout(shape.layout, |
| 485 | internal_shape::ToShapeFunc<L>{this, shape}); |
| 486 | } |
| 487 | |
| 488 | // For all axis defined in a given shape copies values to this shape. |
| 489 | // Therefore, it is possible to copy dimensions from CHW to BCHW, but not |