mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Dilated convolutions (#657)
* Add the dilation parameter. * Restore the basic optimizer example. * Dilation support in cudnn. * Use the dilation parameter in the cpu backend. * More dilation support. * No support for dilation in transposed convolutions. * Add dilation to a test. * Remove a print. * Helper function.
This commit is contained in:
@ -66,6 +66,7 @@ impl ResnetBlock2D {
|
||||
stride: 1,
|
||||
padding: 1,
|
||||
groups: 1,
|
||||
dilation: 1,
|
||||
};
|
||||
let norm1 = nn::group_norm(config.groups, in_channels, config.eps, vs.pp("norm1"))?;
|
||||
let conv1 = conv2d(in_channels, out_channels, 3, conv_cfg, vs.pp("conv1"))?;
|
||||
@ -80,6 +81,7 @@ impl ResnetBlock2D {
|
||||
stride: 1,
|
||||
padding: 0,
|
||||
groups: 1,
|
||||
dilation: 1,
|
||||
};
|
||||
Some(conv2d(
|
||||
in_channels,
|
||||
|
Reference in New Issue
Block a user