diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/partial_program.py b/python/paddle/fluid/dygraph/dygraph_to_static/partial_program.py index c9e659cb68b1c5d482ef9f0676bcd8b81fc73f2a..28053f00be9629e5b6dfc2b9a383ad0322f5f9a9 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/partial_program.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/partial_program.py @@ -599,16 +599,6 @@ class PartialProgramLayer: == paddle.float16): in_vars[i] = var.astype('float16') in_vars[i].name = name - if (self.forward_program.global_block().has_var(name) - and self.forward_program.global_block().var(name).dtype - == paddle.float16): - in_vars[i] = var.astype('float16') - in_vars[i].name = name - if (self.backward_program.global_block().has_var(name) - and self.backward_program.global_block().var(name).dtype - == paddle.float16): - in_vars[i] = var.astype('float16') - in_vars[i].name = name @property def program(self):