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:
Eric Buehler
2023-09-11 11:01:11 -04:00
committed by GitHub
parent dbd4561416
commit 59e63d690c
2 changed files with 21 additions and 0 deletions

View File

@ -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 {