diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-07-22 11:39:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-22 10:39:27 +0100 |
commit | 43c72232927ca80c850a73ce977c2063d5a2dcf5 (patch) | |
tree | c93c07984e06b1925313f4f641a8b1a3956fc0ed /candle-nn/src/layer_norm.rs | |
parent | 52c5d8c087f6a2ee91b807467860eb3e96bb6267 (diff) | |
download | candle-43c72232927ca80c850a73ce977c2063d5a2dcf5.tar.gz candle-43c72232927ca80c850a73ce977c2063d5a2dcf5.tar.bz2 candle-43c72232927ca80c850a73ce977c2063d5a2dcf5.zip |
Rename the .r functions to .dims so as to be a bit more explicit. (#220)
Diffstat (limited to 'candle-nn/src/layer_norm.rs')
-rw-r--r-- | candle-nn/src/layer_norm.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-nn/src/layer_norm.rs b/candle-nn/src/layer_norm.rs index 88d5ab32..8f8544bb 100644 --- a/candle-nn/src/layer_norm.rs +++ b/candle-nn/src/layer_norm.rs @@ -49,7 +49,7 @@ impl LayerNorm { DType::F16 | DType::BF16 => DType::F32, d => d, }; - let (_bsize, _seq_len, hidden_size) = x.shape().r3()?; + let (_bsize, _seq_len, hidden_size) = x.dims3()?; let x = x.to_dtype(internal_dtype)?; let mean_x = (x.sum_keepdim(2)? / hidden_size as f64)?; let x = x.broadcast_sub(&mean_x)?; |