Skip to main content

DistributedLayer

Trait DistributedLayer 

Source
pub trait DistributedLayer: Module {
    type Input;
    type Output;

    // Required method
    fn forward(&self, input: Self::Input) -> Self::Output;
}
Expand description

One layer of a model split by LayerParallelism. It runs on the device its placement gives it, and what it returns moves to the next layer’s device.

Required Associated Types§

Source

type Input

What the layer takes, already on its device.

Source

type Output

What the layer returns, left on its device.

Required Methods§

Source

fn forward(&self, input: Self::Input) -> Self::Output

Run the layer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§