提交 d7405e1e 编写于 作者: Y Yu Yang

Fix a typo before

上级 a76f7ed2
...@@ -16,6 +16,7 @@ __all__ = [ ...@@ -16,6 +16,7 @@ __all__ = [
class Optimizer(object): class Optimizer(object):
def __init__(self, **kwargs): def __init__(self, **kwargs):
import py_paddle.swig_paddle as swig_api
if 'batch_size' in kwargs: if 'batch_size' in kwargs:
del kwargs['batch_size'] # not important for python library. del kwargs['batch_size'] # not important for python library.
...@@ -24,8 +25,6 @@ class Optimizer(object): ...@@ -24,8 +25,6 @@ class Optimizer(object):
self.__opt_conf_proto__ = config_parser_utils.parse_optimizer_config( self.__opt_conf_proto__ = config_parser_utils.parse_optimizer_config(
__impl__) __impl__)
if swig_api is None:
raise RuntimeError("paddle.v2 currently need swig_paddle")
self.__opt_conf__ = swig_api.OptimizationConfig.createFromProto( self.__opt_conf__ = swig_api.OptimizationConfig.createFromProto(
self.__opt_conf_proto__) self.__opt_conf_proto__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册