Struct fetish_lib::func_schmear::FuncSchmear [−][src]
pub struct FuncSchmear { pub mean: Array2<f32>, pub covariance: FuncScatterTensor, }
Expand description
Represents a probability distribution over linear mappings
whose covariance structure is separable between input and output.
This can be conceptualized as a specialization of Schmear
for a distribution over matrices where the covariance of the (vectorized)
random variable takes the separable form kron(out_covariance, in_covariance)
for out_covariance
and in_covariance
output coordinate and input coordinate
covariances, respectively, and kron
referring to crate::linalg_utils::kron
See also FuncScatterTensor
.
Fields
mean: Array2<f32>
covariance: FuncScatterTensor
Implementations
impl FuncSchmear
[src]
impl FuncSchmear
[src]pub fn compress(&self, mat: ArrayView2<'_, f32>) -> Schmear
[src]
pub fn compress(&self, mat: ArrayView2<'_, f32>) -> Schmear
[src]Given a transformation matrix from the full, flattened dimension
of this FuncSchmear
to a smaller dimension, performs a fused
FuncSchmear::flatten
and Schmear::transform
operation using
the specified transformation. This fused operation is written
to be much faster than manually performing the aforementioned operations.
pub fn flatten(&self) -> Schmear
[src]
pub fn flatten(&self) -> Schmear
[src]Converts this FuncSchmear
over linear maps to its corresponding Schmear
over vectorized linear mappings.
pub fn apply(&self, x: &Schmear) -> Schmear
[src]
pub fn apply(&self, x: &Schmear) -> Schmear
[src]Computes the output Schmear
of this FuncSchmear
applied
to a given argument Schmear
.
Given an input schmear, computes the output schmear which
would result from sampling (function, input)
pairs,
computing function(input)
for each of them, and then
obtaining the Schmear
over those results.
Auto Trait Implementations
impl RefUnwindSafe for FuncSchmear
impl Send for FuncSchmear
impl Sync for FuncSchmear
impl Unpin for FuncSchmear
impl UnwindSafe for FuncSchmear
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,