Skip to content

Commit

Permalink
fix typos, test=document_fix (#59754)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV committed Dec 7, 2023
1 parent fd93c54 commit 6815027
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion paddle/fluid/eager/pylayer/py_layer_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GradNodePyLayer::operator()(
PADDLE_ENFORCE_EQ(ctx->forward_output_tensor_is_duplicable.size(),
grads.size(),
paddle::platform::errors::InvalidArgument(
"%s's grad input size(%s) mast be equal with it's "
"%s's grad input size(%s) must be equal with it's "
"forward's output size(%s).",
name(),
grads.size(),
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/autograd/saved_tensors_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class saved_tensors_hooks:
backward need use the saved inputs/outputs tensors. Then you can reload
the tensor and return it to paddle framework. The input of `unpack_hook`
is the information returned by `pack_hook`. The output of `unpack_hook`
is a tensor reloaded by the information, and the tensor mast has the same
is a tensor reloaded by the information, and the tensor must has the same
content as the original tensor passed as input to the corresponding
`pack_hook`.
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/base/layers/layer_function_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def func(x, name=None):
and x.is_view_var
):
raise ValueError(
'Sorry about what\'s happend. In to_static mode, {}\'s output variable {} is a viewed Tensor in dygraph. This will result in inconsistent calculation behavior between dynamic and static graphs. You mast find the location of the strided API be called, and call {} = {}.assign().'.format(
'Sorry about what\'s happend. In to_static mode, {}\'s output variable {} is a viewed Tensor in dygraph. This will result in inconsistent calculation behavior between dynamic and static graphs. You must find the location of the strided API be called, and call {} = {}.assign().'.format(
inplace_op_type, x.name, x.name, x.nameb
)
)
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/utils/inplace_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __impl__(*args, **kwargs):
for arg in args:
if hasattr(arg, "is_view_var") and arg.is_view_var:
raise ValueError(
f'Sorry about what\'s happend. In to_static mode, {func.__name__}\'s output variable {arg.name} is a viewed Tensor in dygraph. This will result in inconsistent calculation behavior between dynamic and static graphs. You mast find the location of the strided API be called, and call {arg.name} = {arg.name}.assign().'
f'Sorry about what\'s happend. In to_static mode, {func.__name__}\'s output variable {arg.name} is a viewed Tensor in dygraph. This will result in inconsistent calculation behavior between dynamic and static graphs. You must find the location of the strided API be called, and call {arg.name} = {arg.name}.assign().'
)

origin_func = f"{func.__module__}.{origin_api_name}"
Expand Down

0 comments on commit 6815027

Please sign in to comment.