Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
fe617f95
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fe617f95
编写于
11月 28, 2022
作者:
2
201716010711
提交者:
GitHub
11月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete gaussian_random_batch_size_like api (#48394)
上级
32143f44
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
95 deletion
+0
-95
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+0
-81
python/paddle/fluid/tests/unittests/test_layers.py
python/paddle/fluid/tests/unittests/test_layers.py
+0
-14
未找到文件。
python/paddle/fluid/layers/nn.py
浏览文件 @
fe617f95
...
...
@@ -117,7 +117,6 @@ __all__ = [
'elementwise_mul'
,
'gaussian_random'
,
'sampling_id'
,
'gaussian_random_batch_size_like'
,
'sum'
,
'slice'
,
'shape'
,
...
...
@@ -7029,86 +7028,6 @@ def sampling_id(x, min=0.0, max=1.0, seed=0, dtype='float32'):
return
out
@
deprecated
(
since
=
'1.8.0'
,
update_to
=
"paddle.normal"
)
@
templatedoc
()
def
gaussian_random_batch_size_like
(
input
,
shape
,
input_dim_idx
=
0
,
output_dim_idx
=
0
,
mean
=
0.0
,
std
=
1.0
,
seed
=
0
,
dtype
=
'float32'
,
):
"""
${comment}
Args:
input (Variable): ${input_comment}
shape (tuple|list): ${shape_comment}
input_dim_idx (int): ${input_dim_idx_comment}
output_dim_idx (int): ${output_dim_idx_comment}
mean (float): ${mean_comment}
std (float): ${std_comment}
seed (int): ${seed_comment}
dtype(np.dtype|core.VarDesc.VarType|str): The type of output data, float32 or float_64.
Returns:
out (Variable): ${out_comment}
Examples:
.. code-block:: python
import paddle
import paddle.fluid as fluid
paddle.enable_static()
input = fluid.data(name="input", shape=[13, 11], dtype='float32')
out = fluid.layers.gaussian_random_batch_size_like(
input, shape=[-1, 11], mean=1.0, std=2.0)
"""
helper
=
LayerHelper
(
'gaussian_random_batch_size_like'
,
**
locals
())
check_type
(
input
,
'input'
,
(
Variable
),
'fluid.layers.gaussian_random_batch_size_like'
,
)
check_type
(
shape
,
'shape'
,
(
list
,
tuple
),
'fluid.layers.gaussian_random_batch_size_like'
,
)
check_dtype
(
dtype
,
'dtype'
,
[
'float16'
,
'float32'
,
'int'
],
'fluid.layers.gaussian_random_batch_size_like'
,
)
out
=
helper
.
create_variable_for_type_inference
(
dtype
)
c_dtype
=
convert_np_dtype_to_dtype_
(
dtype
)
helper
.
append_op
(
type
=
'gaussian_random_batch_size_like'
,
inputs
=
{
'Input'
:
input
},
outputs
=
{
'Out'
:
out
},
attrs
=
{
'shape'
:
shape
,
'input_dim_idx'
:
input_dim_idx
,
'output_dim_idx'
:
output_dim_idx
,
'mean'
:
mean
,
'std'
:
std
,
'seed'
:
seed
,
'dtype'
:
c_dtype
,
},
)
return
out
@
templatedoc
()
def
sum
(
x
):
"""
...
...
python/paddle/fluid/tests/unittests/test_layers.py
浏览文件 @
fe617f95
...
...
@@ -2921,7 +2921,6 @@ class TestBook(LayerTest):
self
.
not_compare_static_dygraph_set
=
set
(
{
"make_gaussian_random"
,
"make_gaussian_random_batch_size_like"
,
"make_kldiv_loss"
,
"make_prelu"
,
"make_sampling_id"
,
...
...
@@ -3580,19 +3579,6 @@ class TestBook(LayerTest):
out
=
layers
.
sampling_id
(
x
)
return
out
def
make_gaussian_random_batch_size_like
(
self
):
with
program_guard
(
fluid
.
default_main_program
(),
fluid
.
default_startup_program
()
):
input
=
self
.
_get_data
(
name
=
"input"
,
shape
=
[
13
,
11
],
dtype
=
'float32'
)
out
=
layers
.
gaussian_random_batch_size_like
(
input
,
shape
=
[
-
1
,
11
],
mean
=
1.0
,
std
=
2.0
)
return
out
def
make_sum
(
self
):
with
program_guard
(
fluid
.
default_main_program
(),
fluid
.
default_startup_program
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录