Another prelu bugfix. (#1407)

This commit is contained in:
Laurent Mazare
2023-12-06 09:54:41 +01:00
committed by GitHub
parent 2648e797c2
commit 236b820e28

View File

@ -73,7 +73,7 @@ impl candle::Module for PReLU {
} }
let mut s = vec![1; xs.rank()]; let mut s = vec![1; xs.rank()];
s[1] = self.weight.elem_count(); s[1] = self.weight.elem_count();
self.weight.broadcast_as(s)? self.weight.reshape(s)?
} else { } else {
self.weight.clone() self.weight.clone()
}; };