Trait leaf::layer::ComputeOutput
[−]
[src]
pub trait ComputeOutput<T, B: IBackend> { fn compute_output(
&self,
backend: &B,
weights_data: &[&SharedTensor<T>],
input_data: &[&SharedTensor<T>],
output_data: &mut [&mut SharedTensor<T>]
); }
A Layer that can compute the output for a given input.
Required Methods
fn compute_output(
&self,
backend: &B,
weights_data: &[&SharedTensor<T>],
input_data: &[&SharedTensor<T>],
output_data: &mut [&mut SharedTensor<T>]
)
&self,
backend: &B,
weights_data: &[&SharedTensor<T>],
input_data: &[&SharedTensor<T>],
output_data: &mut [&mut SharedTensor<T>]
)
Compute output for given input and write them into output_data
.
Implementors
impl<B: IBackend + Relu<f32>> ComputeOutput<f32, B> for ReLU
impl<B: IBackend + Sigmoid<f32>> ComputeOutput<f32, B> for Sigmoid
impl<B: IBackend + Tanh<f32>> ComputeOutput<f32, B> for TanH
impl<B: IBackend + LayerOps<f32>> ComputeOutput<f32, B> for Linear
impl<B: IBackend + LogSoftmax<f32>> ComputeOutput<f32, B> for LogSoftmax
impl<B: IBackend + Softmax<f32>> ComputeOutput<f32, B> for Softmax
impl<B: IBackend> ComputeOutput<f32, B> for NegativeLogLikelihood
impl<B: IBackend> ComputeOutput<f32, B> for Reshape
impl<B: IBackend + LayerOps<f32> + 'static> ComputeOutput<f32, B> for Sequential<B>