layers.tensor.BasisBatch
Basis batch \(D\) @ \(\phi^{[p]}_{i_p}\).
Note
The batch dimension "D"
must be the first index.
Methods
Name | Description |
---|---|
as_basis_batch | Convert to BasisBatch |
as_core | Convert to Core |
as_core_basis_batch | Convert to CoreBasisBatch |
as_left_block_batch | Convert to LeftBlockBatch |
as_ndarray | Convert to jax.Array (Array) |
as_right_block_batch | Convert to RightBlockBatch |
as_tensor | Convert to Tensor |
as_twodot_core | Convert to TwodotCore |
normalize | Normalize tensor |
scale_to | Scale maximum abs element of the tensor to the given scale |
as_basis_batch
Convert to BasisBatch
Returns
Name | Type | Description |
---|---|---|
BasisBatch | BasisBatch | BasisBatch tensor |
as_core
Convert to Core
Returns
Name | Type | Description |
---|---|---|
Core | Core | Core tensor |
as_core_basis_batch
Convert to CoreBasisBatch
Returns
Name | Type | Description |
---|---|---|
CoreBasisBatch | CoreBasisBatch | CoreBasisBatch tensor |
as_left_block_batch
Convert to LeftBlockBatch
Returns
Name | Type | Description |
---|---|---|
LeftBlockBatch | LeftBlockBatch | LeftBlockBatch tensor |
as_ndarray
Convert to jax.Array (Array)
Returns
Name | Type | Description |
---|---|---|
Array | Array | Array tensor |
as_right_block_batch
Convert to RightBlockBatch
Returns
Name | Type | Description |
---|---|---|
RightBlockBatch | RightBlockBatch | RightBlockBatch tensor |
as_tensor
Convert to Tensor
Returns
Name | Type | Description |
---|---|---|
Tensor | Tensor | Tensor tensor |
as_twodot_core
Convert to TwodotCore
Returns
Name | Type | Description |
---|---|---|
TwodotCore | TwodotCore | TwodotCore tensor |
normalize
Normalize tensor
Tensor is normalized and return the norm of the tensor.
Returns
Name | Type | Description |
---|---|---|
Array | Array | norm of the tensor before normalization |
scale_to
Scale maximum abs element of the tensor to the given scale
Parameters
Name | Type | Description | Default |
---|---|---|---|
scale | float | Array | scale factor. Defaults to jnp.array(1.0). | None |
ord | str | norm type to scale either “fro” or “max”. Defaults to “fro” (Frobenius norm). “fro” : Frobenius norm “max” : maximum absolute value | 'fro' |
Returns
Name | Type | Description |
---|---|---|
Array | Array | multiplication factor to scale the tensor |