Tensor
Type alias exposing TorchSharp tensor under the shorter Toro name.
Instance members
| Name | Description |
|---|---|
this.Dimensions | |
this.ElementSize | |
this.H | |
this.Handle | |
this.IsInvalid | |
this.NumberOfElements | |
this.SparseIndices | |
this.SparseValues | |
this.T | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.TensorItems | |
this.bytes | |
this.device | |
this.device_index | |
this.device_type | |
this.dtype | |
this.grad | |
this.imag | |
this.is_cuda | |
this.is_leaf | |
this.is_meta | |
this.is_sparse | |
this.mH | |
this.mT | |
this.name | |
this.names | |
this.ndim | |
this.real | |
this.requires_grad | |
this.shape |
Static members
| Name | Description |
|---|---|
Tensor.PeakCount | |
Tensor.TotalCount |
TIdx
Index specifier for Tensor.at. I=single, S=slice, A=all, T=tensor, E=ellipsis, N=newaxis.
Union cases
| Name | Description |
|---|---|
A | |
E | |
I int | |
N | |
S(start, stop) | |
Sf start | |
St stop | |
T Tensor |
Instance members
| Name | Description |
|---|---|
this.IsA | |
this.IsE | |
this.IsI | |
this.IsN | |
this.IsS | |
this.IsSf | |
this.IsSt | |
this.IsT |
TensorOps
| Function | Description |
|---|---|
a .<. b | Elementwise a < b. |
a .<=. b | Elementwise . |
a .<>. b | Elementwise . |
a .=. b | Elementwise . |
a .>. b | Elementwise a > b. |
a .>=. b | Elementwise . |
scalar v | Convert a float to a TorchSharp Scalar for use with tensor operators. |
(.<.)
a .<. b
Elementwise a < b.
Parameters
a:Tensorb:Tensor
Returns Tensor
(.<=.)
a .<=. b
Elementwise .
Parameters
a:Tensorb:Tensor
Returns Tensor
(.<>.)
a .<>. b
Elementwise .
Parameters
a:Tensorb:Tensor
Returns Tensor
(.=.)
a .=. b
Elementwise .
Parameters
a:Tensorb:Tensor
Returns Tensor
(.>.)
a .>. b
Elementwise a > b.
Parameters
a:Tensorb:Tensor
Returns Tensor
(.>=.)
a .>=. b
Elementwise .
Parameters
a:Tensorb:Tensor
Returns Tensor
scalar
scalar v
Convert a float to a TorchSharp Scalar for use with tensor operators.
Parameters
v:float
Returns Scalar
TensorExtensions
Tensor module
| Function | Description |
|---|---|
keep t | Move a tensor out of the current dispose scope so it |
survives when that scope exits. Inside scoped { }, | |
return values are auto-kept, so keep is only needed | |
| for side-effect retention (e.g. caching a tensor in a mutable field). |
keep
keep t
Move a tensor out of the current dispose scope so it
survives when that scope exits. Inside scoped { },
return values are auto-kept, so keep is only needed
for side-effect retention (e.g. caching a tensor in a mutable field).
Parameters
t:Tensor
Returns Tensor