mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-11 06:15:56 +03:00
Fixed fp16 training/inference with factors-combine concat (#926)
This commit is contained in:
parent
78bef7aeba
commit
23c36ec1a3
@ -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
|
||||
|
@ -57,8 +57,7 @@ Embedding::Embedding(Ptr<ExpressionGraph> graph, Ptr<Options> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user