From 236b820e286fcdc01ad7923125d9dac1eaa9c18d Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Wed, 6 Dec 2023 09:54:41 +0100 Subject: [PATCH] Another prelu bugfix. (#1407) --- candle-nn/src/activation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/candle-nn/src/activation.rs b/candle-nn/src/activation.rs index c7dd359f..80b750ed 100644 --- a/candle-nn/src/activation.rs +++ b/candle-nn/src/activation.rs @@ -73,7 +73,7 @@ impl candle::Module for PReLU { } let mut s = vec![1; xs.rank()]; s[1] = self.weight.elem_count(); - self.weight.broadcast_as(s)? + self.weight.reshape(s)? } else { self.weight.clone() };