提交 76876f52 编写于 作者: L LielinJiang

fix reviews

上级 a9ae9555
......@@ -111,15 +111,16 @@ class MobileNetV1(Model):
Args:
scale (float): scale of channels in each layer. Default: 1.0.
num_classes (int): output dim of last fc layer. Default: -1.
with_pool (bool): use pool or not. Default: False.
num_classes (int): output dim of last fc layer. If num_classes <=0, last fc layer
will not be defined. Default: 1000.
with_pool (bool): use pool before the last fc layer or not. Default: True.
classifier_activation (str): activation for the last fc layer. Default: 'softmax'.
"""
def __init__(self,
scale=1.0,
num_classes=-1,
with_pool=False,
num_classes=1000,
with_pool=True,
classifier_activation='softmax'):
super(MobileNetV1, self).__init__()
self.scale = scale
......
......@@ -156,15 +156,16 @@ class MobileNetV2(Model):
Args:
scale (float): scale of channels in each layer. Default: 1.0.
num_classes (int): output dim of last fc layer. Default: -1.
with_pool (bool): use pool or not. Default: False.
num_classes (int): output dim of last fc layer. If num_classes <=0, last fc layer
will not be defined. Default: 1000.
with_pool (bool): use pool before the last fc layer or not. Default: True.
classifier_activation (str): activation for the last fc layer. Default: 'softmax'.
"""
def __init__(self,
scale=1.0,
num_classes=-1,
with_pool=False,
num_classes=1000,
with_pool=True,
classifier_activation='softmax'):
super(MobileNetV2, self).__init__()
self.scale = scale
......
......@@ -163,16 +163,17 @@ class ResNet(Model):
Args:
Block (BasicBlock|BottleneckBlock): block module of model.
depth (int): layers of resnet, default: 50.
num_classes (int): output dim of last fc layer, default: 1000.
with_pool (bool): use pool or not. Default: False.
num_classes (int): output dim of last fc layer. If num_classes <=0, last fc layer
will not be defined. Default: 1000.
with_pool (bool): use pool before the last fc layer or not. Default: True.
classifier_activation (str): activation for the last fc layer. Default: 'softmax'.
"""
def __init__(self,
Block,
depth=50,
num_classes=-1,
with_pool=False,
num_classes=1000,
with_pool=True,
classifier_activation='softmax'):
super(ResNet, self).__init__()
......
......@@ -58,13 +58,14 @@ class VGG(Model):
Args:
features (fluid.dygraph.Layer): vgg features create by function make_layers.
num_classes (int): output dim of last fc layer. Default: -1.
num_classes (int): output dim of last fc layer. If num_classes <=0, last fc layer
will not be defined. Default: 1000.
classifier_activation (str): activation for the last fc layer. Default: 'softmax'.
"""
def __init__(self,
features,
num_classes=-1,
num_classes=1000,
classifier_activation='softmax'):
super(VGG, self).__init__()
self.features = features
......
......@@ -289,7 +289,8 @@ class Normalize(object):
class Permute(object):
"""Change input data to a target mode.
For example, most transforms use HWC mode image,
while the Neural Network might use CHW mode input tensor
while the Neural Network might use CHW mode input tensor.
Input image should be HWC mode and an instance of numpy.ndarray.
Args:
mode: Output mode of input. Use "CHW" mode by default.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册