diff --git a/CHANGELOG.md b/CHANGELOG.md index 721ffd06..fe2f91ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Scripts using PyYAML now use `safe_load`; see https://msg.pyyaml.org/load - Fixed check for `fortran_ordering` in cnpy +- Fixed fp16 training/inference with factors-combine concat method ### Changed - Make guided-alignment faster via sparse memory layout, add alignment points for EOS, remove losses other than ce diff --git a/src/layers/embedding.cpp b/src/layers/embedding.cpp index 26d6b7fe..d6768fdb 100644 --- a/src/layers/embedding.cpp +++ b/src/layers/embedding.cpp @@ -57,8 +57,7 @@ Embedding::Embedding(Ptr graph, Ptr options) auto lemmaEmbs = rows(E_, lemmaIndices); int dimFactors = FactorEmbMatrix_->shape()[0]; auto factEmbs - = dot(graph->constant( - {(int)data.size(), dimFactors}, inits::fromVector(factorIndices), Type::float32), + = dot(graph->constant({(int)data.size(), dimFactors}, inits::fromVector(factorIndices)), FactorEmbMatrix_); return concatenate({lemmaEmbs, factEmbs}, -1);