提交 7c40324b 编写于 作者: C ceci3

fix for py3

上级 95a95672
......@@ -11,10 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import flops as flops_module
from flops import *
import model_size as model_size_module
from model_size import *
__all__ = []
__all__ += flops_module.__all__
__all__ += model_size_module.__all__
from .flops import flops
from .model_size import model_size
__all__ = ['flops', 'model_size']
......@@ -11,25 +11,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import controller
from controller import *
import sa_controller
from sa_controller import *
import log_helper
from log_helper import *
import controller_server
from controller_server import *
import controller_client
from controller_client import *
import lock_utils
from lock_utils import *
import cached_reader as cached_reader_module
from cached_reader import *
from .controller import EvolutionaryController
from .sa_controller import SAController
from .log_helper import get_logger
from .controller_server import ControllerServer
from .controller_client import ControllerClient
from .lock_utils import lock, unlock
from .cached_reader import cached_reader
__all__ = []
__all__ += controller.__all__
__all__ += sa_controller.__all__
__all__ += controller_server.__all__
__all__ += controller_client.__all__
__all__ += lock_utils.__all__
__all__ += cached_reader_module.__all__
__all__ = [
'EvolutionaryController', 'SAController', 'get_logger', 'ControllerServer',
'ControllerClient', 'lock', 'unlock', 'cached_reader'
]
......@@ -14,7 +14,7 @@
import logging
import socket
from log_helper import get_logger
from .log_helper import get_logger
__all__ = ['ControllerClient']
......
......@@ -107,7 +107,7 @@ class ControllerServer(object):
_logger.debug("send message to {}: [{}]".format(addr,
tokens))
conn.close()
except Exception, err:
except Exception as err:
_logger.error(err)
finally:
self._socket_server.close()
......
......@@ -18,7 +18,7 @@ import math
import logging
import numpy as np
from .controller import EvolutionaryController
from log_helper import get_logger
from .log_helper import get_logger
__all__ = ["SAController"]
......
......@@ -12,11 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import search_space
from search_space import *
import sa_nas
from sa_nas import *
from .search_space import *
from .sa_nas import SANAS
__all__ = []
__all__ += search_space.__all__
__all__ += sa_nas.__all__
__all__ = ['SANAS']
......@@ -12,21 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mobilenetv2
from .mobilenetv2 import *
import mobilenetv1
from .mobilenetv1 import *
import resnet
from .resnet import *
import search_space_registry
from search_space_registry import *
import search_space_factory
from search_space_factory import *
import search_space_base
from search_space_base import *
from .mobilenetv2 import MobileNetV2Space
from .mobilenetv1 import MobileNetV1Space
from .resnet import ResNetSpace
from .search_space_registry import SEARCHSPACE
from .search_space_factory import SearchSpaceFactory
from .search_space_base import SearchSpaceBase
__all__ = []
__all__ += mobilenetv2.__all__
__all__ += search_space_registry.__all__
__all__ += search_space_factory.__all__
__all__ += search_space_base.__all__
__all__ = [
'MobileNetV1Space', 'MobileNetV2Space', 'ResNetSpace', 'SearchSpaceBase',
'SearchSpaceFactory', 'SEARCHSPACE'
]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册