summaryrefslogtreecommitdiff
path: root/candle-nn
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-12-15 01:35:08 +0100
committerNicolas Patry <patry.nicolas@protonmail.com>2023-12-15 01:35:08 +0100
commitece4c69a681215837fd5a008e2ee652394daa8ed (patch)
tree6bb5913a61b770f1d71df1153764058fe2d88bec /candle-nn
parent4eeaf205d6d0577805a41dc7ae2457be1862726a (diff)
downloadcandle-ece4c69a681215837fd5a008e2ee652394daa8ed.tar.gz
candle-ece4c69a681215837fd5a008e2ee652394daa8ed.tar.bz2
candle-ece4c69a681215837fd5a008e2ee652394daa8ed.zip
Fixing softmax.
Diffstat (limited to 'candle-nn')
-rw-r--r--candle-nn/src/ops.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-nn/src/ops.rs b/candle-nn/src/ops.rs
index e002d931..f00d8e2f 100644
--- a/candle-nn/src/ops.rs
+++ b/candle-nn/src/ops.rs
@@ -220,7 +220,7 @@ impl candle::CustomOp1 for SoftmaxLastDim {
};
let n = layout.stride().len();
- if !(layout.stride()[n - 1] == 1 && layout.start_offset() == 0) {
+ if !(layout.is_contiguous() && layout.stride()[n - 1] == 1 && layout.start_offset() == 0) {
candle::bail!("Non contiguous softmax-last-dim is not implemented");
}