Extract T5 module and add main function to use it (#829)

* Extract t5 out of musicgen

* Add main for t5 module
This commit is contained in:
Juarez Bochi
2023-09-12 23:14:05 -07:00
committed by GitHub
parent e82fcf1c59
commit 9daa6dbe87
8 changed files with 184 additions and 21 deletions

View File

@ -1,7 +1,10 @@
use candle::Tensor;
use serde::Deserialize;
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Deserialize, Default)]
#[serde(rename_all = "lowercase")]
pub enum Activation {
#[default]
Gelu,
Relu,
Elu(f64),