Tensor.Resize<T>(Tensor<T>, ReadOnlySpan<IntPtr>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new Tensor<T>, allocates new memory, and copies the data from tensor
. If the final shape is smaller all data after
that point is ignored.
public:
generic <typename T>
static System::Numerics::Tensors::Tensor<T> ^ Resize(System::Numerics::Tensors::Tensor<T> ^ tensor, ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.Tensor<T> Resize<T> (System.Numerics.Tensors.Tensor<T> tensor, ReadOnlySpan<IntPtr> lengths);
static member Resize : System.Numerics.Tensors.Tensor<'T> * ReadOnlySpan<nativeint> -> System.Numerics.Tensors.Tensor<'T>
Public Function Resize(Of T) (tensor As Tensor(Of T), lengths As ReadOnlySpan(Of IntPtr)) As Tensor(Of T)
Type Parameters
- T
Parameters
- lengths
-
ReadOnlySpan<nativeint>
ReadOnlySpan<T> of the desired new shape.
Returns
Applies to
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.