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
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.