mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 19:58:35 +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:
@ -79,7 +79,7 @@ pub fn group_norm(
|
||||
eps: f64,
|
||||
vb: crate::VarBuilder,
|
||||
) -> Result<GroupNorm> {
|
||||
let weight = vb.get_or_init(num_channels, "weight", crate::Init::Const(1.))?;
|
||||
let bias = vb.get_or_init(num_channels, "bias", crate::Init::Const(0.))?;
|
||||
let weight = vb.get_with_hints(num_channels, "weight", crate::Init::Const(1.))?;
|
||||
let bias = vb.get_with_hints(num_channels, "bias", crate::Init::Const(0.))?;
|
||||
GroupNorm::new(weight, bias, num_channels, num_groups, eps)
|
||||
}
|
||||
|
Reference in New Issue
Block a user