Update the sync data v1
This commit is contained in:
		
							
								
								
									
										21
									
								
								exps/experimental/test-dynamic.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								exps/experimental/test-dynamic.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| ##################################################### | ||||
| # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019.08 # | ||||
| ##################################################### | ||||
| # python test-dynamic.py | ||||
| ##################################################### | ||||
| import sys | ||||
| from pathlib import Path | ||||
|  | ||||
| lib_dir = (Path(__file__).parent / ".." / "..").resolve() | ||||
| print("LIB-DIR: {:}".format(lib_dir)) | ||||
| if str(lib_dir) not in sys.path: | ||||
|     sys.path.insert(0, str(lib_dir)) | ||||
|  | ||||
| from xautodl.datasets.math_core import ConstantFunc | ||||
| from xautodl.datasets.math_core import GaussianDGenerator | ||||
|  | ||||
| mean_generator = ConstantFunc(0) | ||||
| cov_generator = ConstantFunc(1) | ||||
|  | ||||
| generator = GaussianDGenerator([mean_generator], [[cov_generator]], (-1, 1)) | ||||
| generator(0, 10) | ||||
| @@ -19,9 +19,11 @@ import seaborn as sns | ||||
| matplotlib.use("agg") | ||||
| import matplotlib.pyplot as plt | ||||
|  | ||||
| lib_dir = (Path(__file__).parent / ".." / ".." / "lib").resolve() | ||||
| lib_dir = (Path(__file__).parent / ".." / "..").resolve() | ||||
| print("LIB-DIR: {:}".format(lib_dir)) | ||||
| if str(lib_dir) not in sys.path: | ||||
|     sys.path.insert(0, str(lib_dir)) | ||||
|  | ||||
| from log_utils import time_string | ||||
| from nats_bench import create | ||||
| from models import get_cell_based_tiny_net | ||||
|   | ||||
| @@ -3,11 +3,7 @@ from copy import deepcopy | ||||
| import torchvision.models as models | ||||
| from pathlib import Path | ||||
|  | ||||
| lib_dir = (Path(__file__).parent / ".." / ".." / "lib").resolve() | ||||
| if str(lib_dir) not in sys.path: | ||||
|     sys.path.insert(0, str(lib_dir)) | ||||
|  | ||||
| from utils import weight_watcher | ||||
| from xautodl.utils import weight_watcher | ||||
|  | ||||
|  | ||||
| def main(): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user