提交 5ac5b2c6 编写于 作者: L lyuwenyu

add inception series

上级 f460f5a8
......@@ -298,3 +298,30 @@ def DenseNet264(**kwargs):
return model
def InceptionV3(**kwargs):
'''InceptionV3
'''
pretrained = kwargs.pop('pretrained', False)
model = _inception_v3.InceptionV3(**kwargs)
if pretrained:
assert 'InceptionV3' in _checkpoints, 'Not provide `InceptionV3` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['InceptionV3'])
model.set_state_dict(paddle.load(path))
return model
def InceptionV4(**kwargs):
'''InceptionV4
'''
pretrained = kwargs.pop('pretrained', False)
model = _inception_v4.InceptionV4(**kwargs)
if pretrained:
assert 'InceptionV4' in _checkpoints, 'Not provide `InceptionV4` pretrained model.'
path = paddle.utils.download.get_weights_path_from_url(_checkpoints['InceptionV4'])
model.set_state_dict(paddle.load(path))
return model
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册