mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 02:38:10 +00:00
Add some group parameter to convolutions. (#566)
* Add some group parameter to convolutions. * Avoid some unnecessary groups checks. * Move the tensor convolution bits. * Properh handling of groups. * Bump the crate version. * And add a changelog.
This commit is contained in:
@ -128,7 +128,11 @@ fn conv(vb: VarBuilder, index: usize, p: usize, b: &Block) -> Result<(usize, Bl)
|
||||
}
|
||||
Some(_) | None => (None, true),
|
||||
};
|
||||
let conv_cfg = candle_nn::Conv2dConfig { stride, padding };
|
||||
let conv_cfg = candle_nn::Conv2dConfig {
|
||||
stride,
|
||||
padding,
|
||||
groups: 1,
|
||||
};
|
||||
let conv = if bias {
|
||||
conv2d(p, filters, size, conv_cfg, vb.pp(&format!("conv_{index}")))?
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user