From aba1e90797e430f28eec13b14b76dd5355876f9c Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Wed, 23 Aug 2023 12:58:55 +0100 Subject: 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. --- candle-examples/examples/stable-diffusion/resnet.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'candle-examples/examples/stable-diffusion/resnet.rs') diff --git a/candle-examples/examples/stable-diffusion/resnet.rs b/candle-examples/examples/stable-diffusion/resnet.rs index 94f436c8..172a9359 100644 --- a/candle-examples/examples/stable-diffusion/resnet.rs +++ b/candle-examples/examples/stable-diffusion/resnet.rs @@ -66,6 +66,7 @@ impl ResnetBlock2D { let conv_cfg = nn::Conv2dConfig { stride: 1, padding: 1, + groups: 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"))?; @@ -79,6 +80,7 @@ impl ResnetBlock2D { let conv_cfg = nn::Conv2dConfig { stride: 1, padding: 0, + groups: 1, }; Some(conv2d( in_channels, -- cgit v1.2.3