From bda202ce87fc3d2dc66f407ebb810799cfb2d599 Mon Sep 17 00:00:00 2001 From: D-X-Y <280835372@qq.com> Date: Wed, 19 May 2021 14:17:20 +0800 Subject: [PATCH] Refine lib -> xautodl --- tests/test_math_adv.py | 12 +++++------- xautodl/models/shape_infers/InferCifarResNet.py | 1 + xautodl/models/shape_infers/InferMobileNetV2.py | 2 ++ xautodl/models/shape_infers/InferTinyCellNet.py | 5 +++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/test_math_adv.py b/tests/test_math_adv.py index 903f615..d31fca0 100644 --- a/tests/test_math_adv.py +++ b/tests/test_math_adv.py @@ -4,14 +4,12 @@ # pytest tests/test_math_adv.py -s # ##################################################### import unittest -import pytest -from xautodl import datasets -from datasets.math_core import QuadraticFunc -from datasets.math_core import ConstantFunc -from datasets.math_core import DynamicLinearFunc -from datasets.math_core import DynamicQuadraticFunc -from datasets.math_core import ComposedSinFunc +from xautodl.datasets.math_core import QuadraticFunc +from xautodl.datasets.math_core import ConstantFunc +from xautodl.datasets.math_core import DynamicLinearFunc +from xautodl.datasets.math_core import DynamicQuadraticFunc +from xautodl.datasets.math_core import ComposedSinFunc class TestConstantFunc(unittest.TestCase): diff --git a/xautodl/models/shape_infers/InferCifarResNet.py b/xautodl/models/shape_infers/InferCifarResNet.py index 0575fd0..1731392 100644 --- a/xautodl/models/shape_infers/InferCifarResNet.py +++ b/xautodl/models/shape_infers/InferCifarResNet.py @@ -3,6 +3,7 @@ ##################################################### import torch.nn as nn import torch.nn.functional as F + from ..initialization import initialize_resnet diff --git a/xautodl/models/shape_infers/InferMobileNetV2.py b/xautodl/models/shape_infers/InferMobileNetV2.py index 4057547..d3db752 100644 --- a/xautodl/models/shape_infers/InferMobileNetV2.py +++ b/xautodl/models/shape_infers/InferMobileNetV2.py @@ -2,7 +2,9 @@ # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019.01 # ##################################################### # MobileNetV2: Inverted Residuals and Linear Bottlenecks, CVPR 2018 +##################################################### from torch import nn + from ..initialization import initialize_resnet from ..SharedUtils import parse_channel_info diff --git a/xautodl/models/shape_infers/InferTinyCellNet.py b/xautodl/models/shape_infers/InferTinyCellNet.py index 3320b9e..d437179 100644 --- a/xautodl/models/shape_infers/InferTinyCellNet.py +++ b/xautodl/models/shape_infers/InferTinyCellNet.py @@ -3,8 +3,9 @@ ##################################################### from typing import List, Text, Any import torch.nn as nn -from models.cell_operations import ResNetBasicblock -from models.cell_infers.cells import InferCell + +from ..cell_operations import ResNetBasicblock +from ..cell_infers.cells import InferCell class DynamicShapeTinyNet(nn.Module):