Skip to content

Commit

Permalink
refine cn docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Mar 19, 2022
1 parent 53decb0 commit 3e11a73
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 36 deletions.
33 changes: 0 additions & 33 deletions docs/api/paddle/vision/models/ResNeXt_cn.rst

This file was deleted.

14 changes: 11 additions & 3 deletions docs/api/paddle/vision/models/ResNet_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ ResNet
:::::::::
- **Block** (BasicBlock|BottleneckBlock) - 模型的残差模块。
- **depth** (int,可选) - resnet模型的深度。默认值:50。
- **width** (int,可选) - resnet模型的基础宽度。默认值:64。
- **groups** (int,可选) - 各个卷积块的分组数。默认值:1。
- **width_per_group** (int,可选) - 各个卷积块的每个卷积组基础宽度。默认值:64。
- **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。
- **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。

Expand All @@ -27,13 +28,20 @@ ResNet模型,Layer的实例。
from paddle.vision.models import ResNet
from paddle.vision.models.resnet import BottleneckBlock, BasicBlock
# build ResNet with 18 layers
resnet18 = ResNet(BasicBlock, 18)
# build ResNet with 50 layers
resnet50 = ResNet(BottleneckBlock, 50)
wide_resnet50_2 = ResNet(BottleneckBlock, 50, width=64*2)
# build Wide ResNet model
wide_resnet50_2 = ResNet(BottleneckBlock, 50, width_per_group=64*2)
resnet18 = ResNet(BasicBlock, 18)
# build ResNeXt model
resnext50_32x4d = ResNet(BottleneckBlock, 50, groups=32, width_per_group=4)
x = paddle.rand([1, 3, 224, 224])
out = resnet18(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnet101_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnet101模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnet152_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnet152模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnet18_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnet18模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnet34_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnet34模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnet50_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnet50模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnext101_32x4d_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnext101_32x4d模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnext101_64x4d_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnext101_64x4d模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnext152_32x4d_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnext152_32x4d模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnext152_64x4d_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnext152_64x4d模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnext50_32x4d_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnext50_32x4d模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/resnext50_64x4d_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ resnext50_64x4d模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/wide_resnet101_2_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ wide_resnet101_2模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]
1 change: 1 addition & 0 deletions docs/api/paddle/vision/models/wide_resnet50_2_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ wide_resnet50_2模型,Layer的实例。
out = model(x)
print(out.shape)
# [1, 1000]

0 comments on commit 3e11a73

Please sign in to comment.