fill_constant
- (shape, dtype, value, force_cpu=False, out=None)[源代码]
- shape (tuple|list)- 创建Tensor的形状。
- value (float|int)- 用于初始化输出LoDTensor或者SelectedRows的常量数据的值。
- force_cpu (bool)- 用于标志LoDTensor或者SelectedRows是否创建在CPU上,默认值为False,若设为true,则数据必须在CPU上。
本文档使用 全库网 构建