From bf37ce24d02179711cecbf43158b85b5d64551d8 Mon Sep 17 00:00:00 2001 From: YibinLiu666 <2632839426@qq.com> Date: Tue, 7 Nov 2023 07:40:34 +0000 Subject: [PATCH] fix doc --- python/paddle/nn/layer/layers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/nn/layer/layers.py b/python/paddle/nn/layer/layers.py index bb15d6b7296e3d..038c7e7053df55 100644 --- a/python/paddle/nn/layer/layers.py +++ b/python/paddle/nn/layer/layers.py @@ -926,7 +926,7 @@ def astype(self, dtype=None): Parameters: dtype(str|paddle.dtype|numpy.dtype): target data type of layer. - If set str, it can be "bool", "float16", "float32", "float64", + If set str, it can be "bool", "bfloat16", "float16", "float32", "float64", "int8", "int16", "int32", "int64", "uint8", "complex64", "complex128". Default: None @@ -995,7 +995,7 @@ def astype(self, dtype=None): return self else: raise ValueError( - "dtype value error, must be 'bfloat16', 'float16', 'float32', 'float64', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'complex64', 'complex128', 'bool', or paddle.dtype, numpy.dtype, but recieve " + "dtype value error, must be 'bfloat16', 'float16', 'float32', 'float64', 'int8', 'int16', 'int32', 'int64', 'uint8', 'complex64', 'complex128', 'bool', or paddle.dtype, numpy.dtype, but recieve " + str(dtype) )