layer-norm icon indicating copy to clipboard operation
layer-norm copied to clipboard

Error loading pretrained model

Open ZeweiChu opened this issue 6 years ago • 0 comments

I got the following error while following step 4 in the training directory, using the pretrained model downloaded from the README file.

>>> import tools

>>> embed_map = tools.load_googlenews_vectors()
>>> model = tools.load_model(embed_map)
Loading dictionary...
Creating inverted dictionary...
Loading model options...
Loading model parameters...
Compiling encoder...
/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/scan_module/scan.py:1017: Warning: In the strict mode, all neccessary shared variables must be passed as a part of non_sequences
  'must be passed as a part of non_sequences', Warning)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tools.py", line 62, in load_model
    trng, x, x_mask, ctx, emb = build_encoder(tparams, options)
  File "model.py", line 147, in build_encoder
    mask=x_mask)
  File "layers.py", line 249, in lngru_layer
    strict=True)
  File "/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/scan_module/scan.py", line 1042, in scan
    scan_outs = local_op(*scan_inputs)
  File "/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/gof/op.py", line 507, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/share/data/speech/zewei/anaconda3/envs/senteval/lib/python2.7/site-packages/theano/scan_module/scan_op.py", line 374, in make_node
    inner_sitsot_out.type.dtype))
ValueError: When compiling the inner function of scan the following error has been encountered: The initial state (`outputs_info` in scan nomenclature) of variable IncSubtensor{Set;:int64:}.0 (argument number 3) has dtype float32, while the result of the inner function (`fn`) has dtype float64. This can happen if the inner function of scan results in an upcast or downcast.

ZeweiChu avatar Jan 14 '19 06:01 ZeweiChu