Header menu logo bristlecone

Tensors Module

More shape-aware intermediary layer for translating between DiffSharp tensors and Bristlecone functions.

Types and nested modules

Type/Module Description

Typed

Unsafe

Operators that rely on the 0/1 encoding of booleans in DiffSharp for working with raw tensors.

Matrix

Scalar

TypedTensor<'Shape, 'u>

'Shape = Scalar | Vector | Matrix 'U = unit of measure for element type (or float for no UoM)

Untyped

Vector

Functions and values

Function or value Description

allocateTensor value

Full Usage: allocateTensor value

Parameters:
    value : 'a

Returns: Tensor
value : 'a
Returns: Tensor

asScalar t

Full Usage: asScalar t

Parameters:
Returns: TypedTensor<Scalar, 'u>
t : Tensor
Returns: TypedTensor<Scalar, 'u>

classify t

Full Usage: classify t

Parameters:
Returns: Untyped
t : Tensor
Returns: Untyped

tryAsMatrix t

Full Usage: tryAsMatrix t

Parameters:
Returns: TypedTensor<Matrix, 'u> option
t : Tensor
Returns: TypedTensor<Matrix, 'u> option

tryAsScalar t

Full Usage: tryAsScalar t

Parameters:
Returns: TypedTensor<Scalar, 'u> option
t : Tensor
Returns: TypedTensor<Scalar, 'u> option

tryAsVector t

Full Usage: tryAsVector t

Parameters:
Returns: TypedTensor<Vector, 'u> option
t : Tensor
Returns: TypedTensor<Vector, 'u> option

Active patterns

Active pattern Description

(|MatrixOfShape|_|) (rows, cols) t

Full Usage: (|MatrixOfShape|_|) (rows, cols) t

Parameters:
    rows : int
    cols : int
    t : Tensor

Returns: TypedTensor<Matrix, 'u> option
rows : int
cols : int
t : Tensor
Returns: TypedTensor<Matrix, 'u> option

(|Matrix|_|) t

Full Usage: (|Matrix|_|) t

Parameters:
Returns: TypedTensor<Matrix, 'u> option
t : Tensor
Returns: TypedTensor<Matrix, 'u> option

(|Scalar|_|) t

Full Usage: (|Scalar|_|) t

Parameters:
Returns: TypedTensor<Scalar, 'u> option
t : Tensor
Returns: TypedTensor<Scalar, 'u> option

(|VectorOfLen|_|) len t

Full Usage: (|VectorOfLen|_|) len t

Parameters:
Returns: TypedTensor<Vector, 'u> option
len : int
t : Tensor
Returns: TypedTensor<Vector, 'u> option

(|Vector|_|) t

Full Usage: (|Vector|_|) t

Parameters:
Returns: TypedTensor<Vector, 'u> option
t : Tensor
Returns: TypedTensor<Vector, 'u> option

Type something to start searching.