pub trait TensorAttention<T: Tensor> {
// Required method
fn attention(
query: &Linear<T>,
key: &Linear<T>,
value: &Linear<T>,
ctx: &mut BertContext<T>,
) -> Result<(), SmeltError>;
}Expand description
TODO
Required Methods§
Sourcefn attention(
query: &Linear<T>,
key: &Linear<T>,
value: &Linear<T>,
ctx: &mut BertContext<T>,
) -> Result<(), SmeltError>
fn attention( query: &Linear<T>, key: &Linear<T>, value: &Linear<T>, ctx: &mut BertContext<T>, ) -> Result<(), SmeltError>
TODO
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.