- paddle.fluid.dygraph.dygraph_to_static.variable_trans_func. data_layer_not_check ( name, shape, dtype='float32', lod_level=0 )
This function creates a Tensor on the global block. The created Tensor doesn’t check the dtype and the shape of feed data because dygraph input data can be various-length. This API is used in translating dygraph into static graph.
stop_gradientattribute of the Tensor created by this API is true, which means the gradient won’t be passed backward through the data Tensor. Set
var.stop_gradient = FalseIf user would like to pass backward gradient.
name (str) – The name/alias of the Tensor, see Name for more details.
shape (list|tuple) – List|Tuple of integers declaring the shape. You can set “None” at a dimension to indicate the dimension can be of any size. For example, it is useful to set changeable batch size as “None”
dtype (np.dtype|VarType|str, optional) – The type of the data. Supported dtype: bool, float16, float32, float64, int8, int16, int32, int64, uint8. Default: float32
lod_level (int, optional) – The LoD level of the LoDTensor. Usually users don’t have to set this value. For more details about when and how to use LoD level, see user_guide_lod_tensor . Default: 0
The global Tensor that gives access to the data.
- Return type