CopyShape copies the shape parameters from another Shape struct. copies the data so it is not accidentally subject to updates.
(cp *Shape)
| 48 | // CopyShape copies the shape parameters from another Shape struct. |
| 49 | // copies the data so it is not accidentally subject to updates. |
| 50 | func (sh *Shape) CopyShape(cp *Shape) { |
| 51 | sh.Sizes = slices.Clone(cp.Sizes) |
| 52 | sh.Strides = slices.Clone(cp.Strides) |
| 53 | sh.Names = slices.Clone(cp.Names) |
| 54 | } |
| 55 | |
| 56 | // Len returns the total length of elements in the tensor |
| 57 | // (i.e., the product of the shape sizes) |
no test coverage detected