tensor2tensor
tensor2tensor copied to clipboard
TypeError: Input 'y' of 'AddV2' Op has type float16 that does not match type float32 of argument 'x'.
Description
when use HPARAMS=universal_transformer_base_fp16 or HPARAMS=transformer_fairseq_fp16_activation_big , tensor2tensor not work
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/utils/t2t_model.py:325 call *
sharded_logits, losses = self.model_fn_sharded(sharded_features)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/utils/t2t_model.py:402 model_fn_sharded *
sharded_logits, sharded_losses = dp(self.model_fn, datashard_to_features)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/utils/expert_utils.py:231 __call__ *
outputs.append(fns[i](*my_args[i], **my_kwargs[i]))
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/utils/t2t_model.py:429 model_fn *
body_out = self.body(transformed_features)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/models/transformer.py:246 body *
encoder_output, encoder_decoder_attention_bias = self.encode(
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/models/transformer.py:201 encode *
self._encoder_function, inputs, target_space, hparams,
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/models/transformer.py:103 transformer_encode *
encoder_output = encoder_function(
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/layers/transformer_layers.py:242 transformer_encoder *
x = common_layers.layer_postprocess(x, y, hparams)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/layers/common_layers.py:993 layer_postprocess *
layer_output,
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensor2tensor/layers/common_layers.py:915 layer_prepostprocess *
x += previous_value
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py:984 binary_op_wrapper
return func(x, y, name=name)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py:1276 _add_dispatch
return gen_math_ops.add_v2(x, y, name=name)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensorflow/python/ops/gen_math_ops.py:483 add_v2
"AddV2", x=x, y=y, name=name)
/home/username/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:506 _apply_op_helper
inferred_from[input_arg.type_attr]))
TypeError: Input 'y' of 'AddV2' Op has type float16 that does not match type float32 of argument 'x'.
Environment information
mesh-tensorflow 0.1.16 tensor2tensor 1.15.7 tensorboard 2.2.2 tensorboard-plugin-wit 1.7.0 tensorflow-addons 0.10.0 tensorflow-datasets 3.1.0 tensorflow-estimator 2.2.0 tensorflow-gan 2.0.0 tensorflow-gpu 2.2.0 tensorflow-hub 0.8.0 tensorflow-metadata 0.22.2 tensorflow-probability 0.7.0 centos7 python3.7