From 8afb2e6e4e42c7c823cead239facbb630842daf9 Mon Sep 17 00:00:00 2001 From: suweiyue Date: Thu, 14 May 2020 17:01:52 +0800 Subject: [PATCH] float -> float32 --- examples/erniesage/models/ernie_model/ernie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/erniesage/models/ernie_model/ernie.py b/examples/erniesage/models/ernie_model/ernie.py index e2c5548..3a8b465 100644 --- a/examples/erniesage/models/ernie_model/ernie.py +++ b/examples/erniesage/models/ernie_model/ernie.py @@ -104,7 +104,7 @@ class ErnieModel(object): zero = L.fill_constant([1], dtype='int64', value=0) input_mask = L.logical_not(L.equal(src_ids, zero)) # assume pad id == 0 - input_mask = L.cast(input_mask, 'float') + input_mask = L.cast(input_mask, 'float32') input_mask.stop_gradient = True return input_mask -- GitLab