mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 03:28:50 +00:00
VarBuilder cleanup (#627)
* VarBuilder cleanup. * Implement the basic varbuilders. * Add the sharded code. * Proper support for tensor sharding.
This commit is contained in:
@ -32,7 +32,7 @@ impl crate::Module for Embedding {
|
||||
}
|
||||
|
||||
pub fn embedding(in_size: usize, out_size: usize, vb: crate::VarBuilder) -> Result<Embedding> {
|
||||
let embeddings = vb.get_or_init(
|
||||
let embeddings = vb.get_with_hints(
|
||||
(in_size, out_size),
|
||||
"weight",
|
||||
crate::Init::Randn {
|
||||
|
Reference in New Issue
Block a user