summaryrefslogtreecommitdiff
path: root/candle-examples/examples/yolo-v3/darknet.rs
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2023-08-23 12:58:55 +0100
committerGitHub <noreply@github.com>2023-08-23 12:58:55 +0100
commitaba1e90797e430f28eec13b14b76dd5355876f9c (patch)
tree16bcf7fb151715d3bcdbec2b5263922bd0bdd35a /candle-examples/examples/yolo-v3/darknet.rs
parent4ee1cf038ada55ec477dcd6496cf2aec1902775b (diff)
downloadcandle-aba1e90797e430f28eec13b14b76dd5355876f9c.tar.gz
candle-aba1e90797e430f28eec13b14b76dd5355876f9c.tar.bz2
candle-aba1e90797e430f28eec13b14b76dd5355876f9c.zip
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.
Diffstat (limited to 'candle-examples/examples/yolo-v3/darknet.rs')
-rw-r--r--candle-examples/examples/yolo-v3/darknet.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/candle-examples/examples/yolo-v3/darknet.rs b/candle-examples/examples/yolo-v3/darknet.rs
index d0392308..de8fcf09 100644
--- a/candle-examples/examples/yolo-v3/darknet.rs
+++ b/candle-examples/examples/yolo-v3/darknet.rs
@@ -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 {