mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 03:28:50 +00:00
Add weight, bias, and hidden_size methods (#816)
* Add weight, bias methods to Conv(1|2) * Add hidden_size method to Embedding * Expose hidden_size
This commit is contained in:
@ -18,6 +18,11 @@ impl Embedding {
|
||||
pub fn embeddings(&self) -> &Tensor {
|
||||
&self.embeddings
|
||||
}
|
||||
|
||||
/// Get the hidden size of the embedding matrix
|
||||
pub fn hidden_size(&self) -> usize {
|
||||
self.hidden_size
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::Module for Embedding {
|
||||
|
Reference in New Issue
Block a user