Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
56e03fb0
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看板
未验证
提交
56e03fb0
编写于
10月 10, 2022
作者:
O
OccupyMars2025
提交者:
GitHub
10月 10, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[typo] correct typo errors in python\paddle\vision\datasets\cifar.py (#46738)
上级
f3329caa
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
5 addition
and
5 deletion
+5
-5
python/paddle/nn/functional/activation.py
python/paddle/nn/functional/activation.py
+2
-2
python/paddle/vision/datasets/cifar.py
python/paddle/vision/datasets/cifar.py
+2
-2
python/paddle/vision/transforms/transforms.py
python/paddle/vision/transforms/transforms.py
+1
-1
未找到文件。
python/paddle/nn/functional/activation.py
浏览文件 @
56e03fb0
...
@@ -1058,9 +1058,9 @@ def softmax(x, axis=-1, dtype=None, name=None):
...
@@ -1058,9 +1058,9 @@ def softmax(x, axis=-1, dtype=None, name=None):
Parameters:
Parameters:
x (Tensor): The input Tensor with data type float32, float64.
x (Tensor): The input Tensor with data type float32, float64.
axis (int, optional): The axis along which to perform
log_
softmax
axis (int, optional): The axis along which to perform softmax
calculations. It should be in range [-D, D), where D is the
calculations. It should be in range [-D, D), where D is the
dimensions
of ``x`` . If ``axis`` < 0, it works the same way as
rank
of ``x`` . If ``axis`` < 0, it works the same way as
:math:`axis + D` . Default is -1.
:math:`axis + D` . Default is -1.
dtype (str, optional): The data type of the output tensor, can be float32, float64.
dtype (str, optional): The data type of the output tensor, can be float32, float64.
name (str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.
name (str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.
...
...
python/paddle/vision/datasets/cifar.py
浏览文件 @
56e03fb0
...
@@ -109,8 +109,8 @@ class Cifar10(Dataset):
...
@@ -109,8 +109,8 @@ class Cifar10(Dataset):
transform
=
None
,
transform
=
None
,
download
=
True
,
download
=
True
,
backend
=
None
):
backend
=
None
):
assert
mode
.
lower
()
in
[
'train'
,
'test'
,
'train'
,
'test'
],
\
assert
mode
.
lower
()
in
[
'train'
,
'test'
],
\
"mode
should be 'train10', 'test10', 'train100' or 'test100
', but got {}"
.
format
(
mode
)
"mode
.lower() should be 'train' or 'test
', but got {}"
.
format
(
mode
)
self
.
mode
=
mode
.
lower
()
self
.
mode
=
mode
.
lower
()
if
backend
is
None
:
if
backend
is
None
:
...
...
python/paddle/vision/transforms/transforms.py
浏览文件 @
56e03fb0
...
@@ -300,7 +300,7 @@ class ToTensor(BaseTransform):
...
@@ -300,7 +300,7 @@ class ToTensor(BaseTransform):
Converts a PIL.Image or numpy.ndarray (H x W x C) to a paddle.Tensor of shape (C x H x W).
Converts a PIL.Image or numpy.ndarray (H x W x C) to a paddle.Tensor of shape (C x H x W).
If input is a grayscale image (H x W), it will be converted to a image of shape (H x W x 1).
If input is a grayscale image (H x W), it will be converted to a
n
image of shape (H x W x 1).
And the shape of output tensor will be (1 x H x W).
And the shape of output tensor will be (1 x H x W).
If you want to keep the shape of output tensor as (H x W x C), you can set data_format = ``HWC`` .
If you want to keep the shape of output tensor as (H x W x C), you can set data_format = ``HWC`` .
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录