mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +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:
@ -101,7 +101,11 @@ impl ConvBlock {
|
||||
padding: Option<usize>,
|
||||
) -> Result<Self> {
|
||||
let padding = padding.unwrap_or(k / 2);
|
||||
let cfg = Conv2dConfig { padding, stride };
|
||||
let cfg = Conv2dConfig {
|
||||
padding,
|
||||
stride,
|
||||
groups: 1,
|
||||
};
|
||||
let conv = conv2d_no_bias(c1, c2, k, cfg, vb.pp("conv"))?;
|
||||
let bn = batch_norm(c2, 1e-3, vb.pp("bn"))?;
|
||||
Ok(Self { conv, bn })
|
||||
|
Reference in New Issue
Block a user