Skip to content

Commit

Permalink
Remove variable scope to not break compatibility with the EnDe checkp…
Browse files Browse the repository at this point in the history
…oint
  • Loading branch information
guillaumekln committed Mar 13, 2018
1 parent 3c827ad commit ccdf0a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions opennmt/decoders/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ def build_output_layer(num_units, vocab_size, dtype=None):
if vocab_size is None:
raise ValueError("vocab_size must be set to build the output layer")

with tf.variable_scope("projection"):
layer = tf.layers.Dense(vocab_size, use_bias=True, dtype=dtype)
layer.build([None, num_units])
return layer
layer = tf.layers.Dense(vocab_size, use_bias=True, dtype=dtype)
layer.build([None, num_units])
return layer

def get_sampling_probability(global_step,
read_probability=None,
Expand Down
6 changes: 3 additions & 3 deletions scripts/wmt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ cd scripts/wmt

## Lazy run...

* Pre-tokenized SentencePiece dataset: https://s3.amazonaws.com/opennmt-trainingdata/wmt_ende_sp.tar.gz
* [Pre-tokenized SentencePiece dataset](https://s3.amazonaws.com/opennmt-trainingdata/wmt_ende_sp.tar.gz)
* Pre-trained averaged model:
* checkpoint: https://s3.amazonaws.com/opennmt-models/averaged-ende-ckpt500k.tar.gz (compatible with [OpenNMT-tf@105d260b](https://github.com/OpenNMT/OpenNMT-tf/commit/105d260b034bfaad3814deb1244a97d2b4102301))
* export: https://s3.amazonaws.com/opennmt-models/averaged-ende-export500k.tar.gz
* [checkpoint](https://s3.amazonaws.com/opennmt-models/averaged-ende-ckpt500k.tar.gz)
* [export](https://s3.amazonaws.com/opennmt-models/averaged-ende-export500k.tar.gz)

This model achieved the following scores:

Expand Down

0 comments on commit ccdf0a3

Please sign in to comment.