[ Web Proxy ]
URL:
Viewing: https://diffsharp.github.io/reference/diffsharp-backends-backendtensorstatics.html [Back]  [Original]

BackendTensorStatics (DiffSharp)

BackendTensorStatics Type

Represents the static functionality for tensors implemented by a DiffSharp backend.

Constructors

Constructor Description

BackendTensorStatics()

Full Usage: BackendTensorStatics()

Returns: BackendTensorStatics
Returns: BackendTensorStatics

Instance members

Instance member Description

this.CreateFromFlatArray

Full Usage: this.CreateFromFlatArray

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Create a tensor of appropriate dtype from a scalar or array of appropriate values. A backend type is delivered consistent with in-memory data - a type for dtype Int32 gets int32 data etc.

data : Array
shape : Shape
dtype : Dtype
device : Device
Returns: RawTensor

this.Empty

Full Usage: this.Empty

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with arbitrary values for the given shape and device

shape : Shape
dtype : Dtype
device : Device
Returns: RawTensor

this.Full

Full Usage: this.Full

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with the given value for the given shape and device

shape : Shape
value : scalar
dtype : Dtype
device : Device
Returns: RawTensor

this.GetDevices

Full Usage: this.GetDevices

Parameters:
Returns: Device list
Modifiers: abstract
?deviceType : DeviceType
Returns: Device list

this.IsDeviceTypeAvailable

Full Usage: this.IsDeviceTypeAvailable

Parameters:
Returns: bool
Modifiers: abstract
deviceType : DeviceType
Returns: bool

this.One

Full Usage: this.One

Parameters:
Returns: RawTensor
Modifiers: abstract
dtype : Dtype
device : Device
Returns: RawTensor

this.Ones

Full Usage: this.Ones

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with ones for the given shape and device

shape : Shape
dtype : Dtype
device : Device
Returns: RawTensor

this.Random

Full Usage: this.Random

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with random values for the given shape and device

shape : Shape
dtype : Dtype
device : Device
Returns: RawTensor

this.RandomInt

Full Usage: this.RandomInt

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with random integers from the given range for the given shape and device

shape : Shape
low : int
high : int
dtype : Dtype
device : Device
Returns: RawTensor

this.RandomNormal

Full Usage: this.RandomNormal

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with random values from the normal distribution for the given shape and device

shape : Shape
dtype : Dtype
device : Device
Returns: RawTensor

this.Seed

Full Usage: this.Seed

Parameters:
    seed : int

Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Sets the seed for the default random number generator of the backend

seed : int

this.Zero

Full Usage: this.Zero

Parameters:
Returns: RawTensor
Modifiers: abstract
dtype : Dtype
device : Device
Returns: RawTensor

this.Zeros

Full Usage: this.Zeros

Parameters:
Returns: RawTensor
Modifiers: abstract
github.png [github.png] github-hover.png [github-hover.png]

Gets a tensor filled with zeros for the given shape and device

shape : Shape
dtype : Dtype
device : Device
Returns: RawTensor

Static members

Static member Description

BackendTensorStatics.Get(?backend)

Full Usage: BackendTensorStatics.Get(?backend)

Parameters:
Returns: BackendTensorStatics
github.png [github.png] github-hover.png [github-hover.png]

Get the backend implementation for the given tensor element type and backend.

?backend : Backend
Returns: BackendTensorStatics

BackendTensorStatics.Seed(?seed)

Full Usage: BackendTensorStatics.Seed(?seed)

Parameters:
    ?seed : int

github.png [github.png] github-hover.png [github-hover.png]

Seed all backends with the given random seed, or a new seed based on the current time if no seed is specified.

?seed : int

Copyright 2021, DiffSharp Contributors.



Web Proxy Viewer  |  New URL  |  Original Page