mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
parent
d92b74f67a
commit
af3aa314d0
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Correct training with fp16 via `--fp16`.
|
||||
- Dynamic cost-scaling with `--cost-scaling`.
|
||||
- Dynamic gradient-scaling with `--dynamic-gradient-scaling`.
|
||||
- Fix compilation with OMP
|
||||
|
||||
### Fixed
|
||||
- Find MKL installed under Ubuntu 20.04 via apt-get
|
||||
|
@ -914,13 +914,13 @@ void CrossEntropyPick(Tensor out, Tensor in, Tensor labelIndices, float labelSmo
|
||||
}
|
||||
|
||||
float sumexp = 0.f;
|
||||
#pragma omp simd reduction(+ : sum)
|
||||
#pragma omp simd reduction(+ : sumexp)
|
||||
for(int i = 0; i < cols; ++i) {
|
||||
sumexp += std::exp(sp[i] - max);
|
||||
}
|
||||
|
||||
float mean = 0.f;
|
||||
#pragma omp simd reduction(+ : sum)
|
||||
#pragma omp simd reduction(+ : mean)
|
||||
for(int i = 0; i < cols; ++i) {
|
||||
mean += sp[i] - max;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user