mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Musicgen text embeddings. (#726)
* Musicgen text embeddings. * Bugfix for layer norm. * Proper position bias. * Expose the weights.
This commit is contained in:
@ -29,6 +29,14 @@ impl Linear {
|
||||
pub fn new(weight: Tensor, bias: Option<Tensor>) -> Self {
|
||||
Self { weight, bias }
|
||||
}
|
||||
|
||||
pub fn weight(&self) -> &Tensor {
|
||||
&self.weight
|
||||
}
|
||||
|
||||
pub fn bias(&self) -> Option<&Tensor> {
|
||||
self.bias.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl super::Module for Linear {
|
||||
|
Reference in New Issue
Block a user