Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
fa449c88
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fa449c88
编写于
2月 26, 2020
作者:
T
tianshuo78520a
提交者:
GitHub
2月 26, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typo word (#22761)
上级
66991218
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
16 deletion
+16
-16
python/paddle/fluid/framework.py
python/paddle/fluid/framework.py
+16
-16
未找到文件。
python/paddle/fluid/framework.py
浏览文件 @
fa449c88
...
...
@@ -458,7 +458,7 @@ def name_scope(prefix=None):
if
in_dygraph_mode
():
yield
else
:
assert
prefix
,
"namescope prefix canot be empty."
assert
prefix
,
"namescope prefix can
n
ot be empty."
global
_name_scope
_name_scope
=
_name_scope
.
child
(
prefix
)
yield
...
...
@@ -1495,7 +1495,7 @@ class Variable(object):
if
length
<
0
:
raise
ValueError
(
"length should not be negative"
)
if
step
==
0
:
raise
ValueError
(
"slice step canot be zero"
)
raise
ValueError
(
"slice step can
n
ot be zero"
)
# Find lower and upper bounds for start and stop.
lower
=
-
1
if
step
<
0
else
0
...
...
@@ -2965,7 +2965,7 @@ class IrVarNode(IrNode):
shape(list): shape to be set.
"""
assert
self
.
node
.
var
()
is
not
None
,
\
"The node variable description canot be None."
"The node variable description can
n
ot be None."
self
.
node
.
var
().
set_shape
(
shape
)
def
persistable
(
self
):
...
...
@@ -2976,7 +2976,7 @@ class IrVarNode(IrNode):
bool: indicate whether the variable is persistable.
"""
assert
self
.
node
.
var
()
is
not
None
,
\
"The node variable description canot be None."
"The node variable description can
n
ot be None."
return
self
.
node
.
var
().
persistable
()
def
type
(
self
):
...
...
@@ -2987,7 +2987,7 @@ class IrVarNode(IrNode):
core.VarDesc.VarType: the variable type.
"""
assert
self
.
node
.
var
()
is
not
None
,
\
"The node variable description canot be None."
"The node variable description can
n
ot be None."
return
self
.
node
.
var
().
type
()
def
dtype
(
self
):
...
...
@@ -2998,7 +2998,7 @@ class IrVarNode(IrNode):
core.VarDesc.VarType: the variable data type.
"""
assert
self
.
node
.
var
()
is
not
None
,
\
"The node variable description canot be None."
"The node variable description can
n
ot be None."
return
self
.
node
.
var
().
dtype
()
def
shape
(
self
):
...
...
@@ -3009,7 +3009,7 @@ class IrVarNode(IrNode):
list: the variable shape.
"""
assert
self
.
node
.
var
()
is
not
None
,
\
"The node variable description canot be None."
"The node variable description can
n
ot be None."
return
self
.
node
.
var
().
shape
()
@
property
...
...
@@ -3059,7 +3059,7 @@ class IrOpNode(IrNode):
new_input_name(str): the new input name.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
self
.
node
.
op
().
_rename_input
(
old_input_name
,
new_input_name
)
def
rename_output
(
self
,
old_output_name
,
new_output_name
):
...
...
@@ -3071,7 +3071,7 @@ class IrOpNode(IrNode):
new_output_name(str): the new output name.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
print
(
"op: {}, old: {}, new: {}
\n
"
.
format
(
self
.
node
.
op
().
type
(
),
old_output_name
,
new_output_name
))
self
.
node
.
op
().
_rename_output
(
old_output_name
,
new_output_name
)
...
...
@@ -3087,7 +3087,7 @@ class IrOpNode(IrNode):
list(str): the argument name list.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
return
self
.
node
.
op
().
input
(
name
)
def
output
(
self
,
name
):
...
...
@@ -3101,7 +3101,7 @@ class IrOpNode(IrNode):
list(str): the argument name list.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
return
self
.
node
.
op
().
output
(
name
)
def
set_type
(
self
,
new_type
):
...
...
@@ -3112,7 +3112,7 @@ class IrOpNode(IrNode):
new_type(str): new operator type to be set.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
return
self
.
node
.
op
().
set_type
(
new_type
)
def
set_attr
(
self
,
name
,
val
):
...
...
@@ -3130,7 +3130,7 @@ class IrOpNode(IrNode):
Update the value of the op desc's attribute by attribute's name.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
desc
=
self
.
node
.
op
()
if
isinstance
(
val
,
Block
):
desc
.
set_block_attr
(
name
,
val
.
desc
)
...
...
@@ -3151,7 +3151,7 @@ class IrOpNode(IrNode):
list(str): input arguments' names of this op node.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
return
self
.
node
.
op
().
input_arg_names
()
def
output_arg_names
(
self
):
...
...
@@ -3162,7 +3162,7 @@ class IrOpNode(IrNode):
list(str): output arguments' names of this op node.
"""
assert
self
.
node
.
op
()
is
not
None
,
\
"The node operator description canot be None."
"The node operator description can
n
ot be None."
return
self
.
node
.
op
().
output_arg_names
()
@
property
...
...
@@ -3459,7 +3459,7 @@ class IrGraph(object):
"""
Perform the topology sort operation on the graph.
Notes: the `graph` canot contain a circle.
Notes: the `graph` can
n
ot contain a circle.
Returns:
list(IrNode): nodes in topology order.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录