コード例 #1
0
ファイル: main.py プロジェクト: ahundt/renas
from enas import utils
from enas.utils import Logger
from enas.utils import DEFINE_boolean
from enas.utils import DEFINE_float
from enas.utils import DEFINE_integer
from enas.utils import DEFINE_string
from enas.utils import print_user_flags

from enas.ptb.ptb_enas_child import PTBEnasChild
from enas.ptb.ptb_enas_controller import PTBEnasController

flags = tf.app.flags
FLAGS = flags.FLAGS

DEFINE_boolean("reset_output_dir", False, "Delete output_dir if exists.")
DEFINE_string("data_path", "", "")
DEFINE_string("output_dir", "", "")
DEFINE_string("search_for", None, "[rhn|base|enas]")

DEFINE_string("child_fixed_arc", None, "")
DEFINE_integer("batch_size", 25, "")
DEFINE_integer("child_base_number", 4, "")
DEFINE_integer("child_num_layers", 2, "")
DEFINE_integer("child_bptt_steps", 20, "")
DEFINE_integer("child_lstm_hidden_size", 200, "")
DEFINE_float("child_lstm_e_keep", 1.0, "")
DEFINE_float("child_lstm_x_keep", 1.0, "")
DEFINE_float("child_lstm_h_keep", 1.0, "")
DEFINE_float("child_lstm_o_keep", 1.0, "")
DEFINE_boolean("child_lstm_l_skip", False, "")
コード例 #2
0
from enas.micro_controller import MicroController
from enas.micro_child import MicroChild

flags = tf.app.flags
FLAGS = flags.FLAGS

# ----- Experiment Settings -----
DEFINE_string("output_dir", "./output-mnist-search", "")
DEFINE_string("train_data_dir", "./data/mnist/train", "")
DEFINE_string("val_data_dir", "./data/mnist/valid", "")
DEFINE_string("test_data_dir", "./data/mnist/test", "")
DEFINE_integer("channel", 1, "MNIST: 1, Cifar10: 3")
DEFINE_integer("img_size", 32, "enlarge image size")
DEFINE_integer("n_aug_img", 1,
               "if 2: num_img: 55000 -> aug_img: 110000, elif 1: False")
DEFINE_boolean("reset_output_dir", True, "Delete output_dir if exists.")

# ------------------------------

# ----Child Model Settings-----
DEFINE_string("data_format", "NHWC", " Data format NHWC or NCHW ")
DEFINE_string("search_for", "micro", "")
DEFINE_integer("batch_size", 128, "")
DEFINE_integer("num_epochs", 300, " = (10+ 20+ 40+ 80)")
DEFINE_integer("child_lr_dec_every", 100, "")
DEFINE_integer("child_num_layers", 2, "Number of layers in the child model")
DEFINE_integer("child_num_cells", 3, "Number of cells in the architecture")
DEFINE_integer("child_filter_size", 5, "")
DEFINE_integer("child_out_filters", 20, "")
DEFINE_integer("child_out_filters_scale", 1, "")
DEFINE_integer(