Skip to content

In new arch, make Layer operations return Result instead of panicking internally #185

@hweom

Description

@hweom

Instead of

pub trait Layer<B: IBackend>: Debug {
    fn compute_output(&self, backend: &B, context: &mut Context);
    fn compute_gradients(&self, backend: &B, context: &mut Context);
}

we would have

pub trait Layer<B: IBackend>: Debug {
    fn compute_output(&self, backend: &B, context: &mut Context) -> Result<(), LayerError>;
    fn compute_gradients(&self, backend: &B, context: &mut Context) -> Result<(), LayerError>;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions