Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
532e4bbf
P
Paddle
项目概览
机器未来
/
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看板
未验证
提交
532e4bbf
编写于
11月 18, 2020
作者:
L
LielinJiang
提交者:
GitHub
11月 18, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix docs (#28683)
上级
db2e6cee
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
6 addition
and
15 deletion
+6
-15
python/paddle/nn/functional/conv.py
python/paddle/nn/functional/conv.py
+1
-2
python/paddle/nn/functional/loss.py
python/paddle/nn/functional/loss.py
+0
-2
python/paddle/nn/layer/loss.py
python/paddle/nn/layer/loss.py
+0
-2
python/paddle/utils/download.py
python/paddle/utils/download.py
+1
-1
python/paddle/vision/datasets/folder.py
python/paddle/vision/datasets/folder.py
+1
-1
python/paddle/vision/transforms/functional.py
python/paddle/vision/transforms/functional.py
+3
-7
未找到文件。
python/paddle/nn/functional/conv.py
浏览文件 @
532e4bbf
...
...
@@ -211,7 +211,7 @@ def conv1d(x,
[[0, 3, 4],
[2, 9, 7],
[5, 6, 8]]]).astype(np.float32)
paddle.disable_static()
x_var = paddle.to_tensor(x)
w_var = paddle.to_tensor(w)
y_var = F.conv1d(x_var, w_var)
...
...
@@ -673,7 +673,6 @@ def conv1d_transpose(x,
import paddle.nn.functional as F
import numpy as np
paddle.disable_static()
# shape: (1, 2, 4)
x=np.array([[[4, 0, 9, 7],
[8, 0, 9, 2,]]]).astype(np.float32)
...
...
python/paddle/nn/functional/loss.py
浏览文件 @
532e4bbf
...
...
@@ -895,8 +895,6 @@ def kl_div(input, label, reduction='mean', name=None):
import numpy as np
import paddle.nn.functional as F
paddle.disable_static()
shape = (5, 20)
input = np.random.uniform(-10, 10, shape).astype('float32')
target = np.random.uniform(-10, 10, shape).astype('float32')
...
...
python/paddle/nn/layer/loss.py
浏览文件 @
532e4bbf
...
...
@@ -773,8 +773,6 @@ class KLDivLoss(fluid.dygraph.Layer):
import numpy as np
import paddle.nn as nn
paddle.disable_static()
shape = (5, 20)
x = np.random.uniform(-10, 10, shape).astype('float32')
target = np.random.uniform(-10, 10, shape).astype('float32')
...
...
python/paddle/utils/download.py
浏览文件 @
532e4bbf
...
...
@@ -123,7 +123,7 @@ def get_weights_path_from_url(url, md5sum=None):
Examples:
.. code-block:: python
from paddle.
incubate.hapi
.download import get_weights_path_from_url
from paddle.
utils
.download import get_weights_path_from_url
resnet18_pretrained_weight_url = 'https://paddle-hapi.bj.bcebos.com/models/resnet18.pdparams'
local_weight_path = get_weights_path_from_url(resnet18_pretrained_weight_url)
...
...
python/paddle/vision/datasets/folder.py
浏览文件 @
532e4bbf
...
...
@@ -306,7 +306,7 @@ class ImageFolder(Dataset):
index (int): Index
Returns:
tuple: (sample, target) where target is class_index of the target class
.
sample of specific index
.
"""
path
=
self
.
samples
[
index
]
sample
=
self
.
loader
(
path
)
...
...
python/paddle/vision/transforms/functional.py
浏览文件 @
532e4bbf
...
...
@@ -39,7 +39,7 @@ from . import functional_tensor as F_t
__all__
=
[
'to_tensor'
,
'hflip'
,
'vflip'
,
'resize'
,
'pad'
,
'rotate'
,
'to_grayscale'
,
'crop'
,
'center_crop'
,
'adjust_brightness'
,
'adjust_contrast'
,
'adjust_hue'
,
'
to_grayscale'
,
'
normalize'
'normalize'
]
...
...
@@ -283,13 +283,11 @@ def center_crop(img, output_size):
return
F_cv2
.
center_crop
(
img
,
output_size
)
def
hflip
(
img
,
backend
=
'pil'
):
def
hflip
(
img
):
"""Horizontally flips the given Image or np.array.
Args:
img (PIL.Image|np.array): Image to be flipped.
backend (str, optional): The image proccess backend type. Options are `pil`,
`cv2`. Default: 'pil'.
Returns:
PIL.Image or np.array: Horizontall flipped image.
...
...
@@ -576,8 +574,6 @@ def to_grayscale(img, num_output_channels=1):
Args:
img (PIL.Image|np.array): Image to be converted to grayscale.
backend (str, optional): The image proccess backend type. Options are `pil`,
`cv2`. Default: 'pil'.
Returns:
PIL.Image or np.array: Grayscale version of the image.
...
...
@@ -624,7 +620,7 @@ def normalize(img, mean, std, data_format='CHW', to_rgb=False):
this option will be igored. Default: False.
Returns:
Tensor: Normalized mage. Data format is same as input img.
np.ndarray or
Tensor: Normalized mage. Data format is same as input img.
Examples:
.. code-block:: python
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录