def test_training(): """Test only no error raised.""" config = SmartDict() config.NETWORK_CLASS = Darknet config.DATASET_CLASS = Dummy config.IS_DEBUG = False config.IMAGE_SIZE = [28, 14] config.BATCH_SIZE = 2 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.TASK = Tasks.CLASSIFICATION # network model config config.NETWORK = SmartDict() config.NETWORK.OPTIMIZER_CLASS = tf.train.AdamOptimizer config.NETWORK.OPTIMIZER_KWARGS = {"learning_rate": 0.001} config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE # daasegt config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = Resize(config.IMAGE_SIZE) config.DATASET.BATCH_SIZE = config.BATCH_SIZE environment.init("test_darknet") prepare_dirs(recreate=True) start_training(config, profile_step=1)
def test_training(): """Verify only that no error raised.""" config = SmartDict() config.NETWORK_CLASS = LMBiSeNet config.DATASET_CLASS = DummyCamvid config.IS_DEBUG = False config.IMAGE_SIZE = [128, 160] config.BATCH_SIZE = 2 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.TASK = Tasks.SEMANTIC_SEGMENTATION # network model config config.NETWORK = SmartDict() config.NETWORK.OPTIMIZER_CLASS = tf.train.AdamOptimizer config.NETWORK.OPTIMIZER_KWARGS = {"learning_rate": 0.001} config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE config.NETWORK.DATA_FORMAT = "NHWC" # daasegt config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = Resize(config.IMAGE_SIZE) config.DATASET.BATCH_SIZE = config.BATCH_SIZE config.DATASET.DATA_FORMAT = "NHWC" environment.init("test_lm_bisenet") prepare_dirs(recreate=True) start_training(config, profile_step=1)
def test_training(): """Test only that no error raised.""" config = SmartDict() config.NETWORK_CLASS = YoloV1 config.DATASET_CLASS = Pascalvoc2007 config.IS_DEBUG = False config.IMAGE_SIZE = [70, 70] config.BATCH_SIZE = 4 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.TASK = Tasks.OBJECT_DETECTION # network model config config.NETWORK = SmartDict() config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE # daasegt config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = ResizeWithGtBoxes(config.IMAGE_SIZE) config.DATASET.BATCH_SIZE = config.BATCH_SIZE environment.init("test_yolov_1") prepare_dirs(recreate=True) start_training(config, profile_step=1)
def test_training(): """Test only that no error raised.""" config = SmartDict() config.NETWORK_CLASS = YoloV2 config.DATASET_CLASS = Pascalvoc2007 config.IS_DEBUG = False config.IMAGE_SIZE = [128, 160] config.BATCH_SIZE = 2 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.TASK = Tasks.OBJECT_DETECTION # network model config config.NETWORK = SmartDict() config.NETWORK.OPTIMIZER_CLASS = tf.train.AdamOptimizer config.NETWORK.OPTIMIZER_KWARGS = {"learning_rate": 0.001} config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE config.NETWORK.DATA_FORMAT = "NHWC" # dataset config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = ResizeWithGtBoxes(config.IMAGE_SIZE) config.DATASET.BATCH_SIZE = config.BATCH_SIZE config.DATASET.DATA_FORMAT = "NHWC" environment.init("test_yolo_v2") prepare_dirs(recreate=True) start_training(config, profile_step=1)
def test_training(): """Test only no error raised.""" config = SmartDict() config.NETWORK_CLASS = LmSinglePoseV1Quantize config.DATASET_CLASS = MscocoSinglePersonKeypoints config.IS_DEBUG = False config.IMAGE_SIZE = [160, 160] config.BATCH_SIZE = 2 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.IS_DISTRIBUTION = False config.TASK = Tasks.KEYPOINT_DETECTION # network model config config.NETWORK = SmartDict() config.NETWORK.OPTIMIZER_CLASS = tf.train.AdamOptimizer config.NETWORK.OPTIMIZER_KWARGS = {"learning_rate": 0.001} config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE config.NETWORK.ACTIVATION_QUANTIZER = linear_mid_tread_half_quantizer config.NETWORK.ACTIVATION_QUANTIZER_KWARGS = {'bit': 2, 'max_value': 2.0} config.NETWORK.WEIGHT_QUANTIZER = binary_channel_wise_mean_scaling_quantizer config.NETWORK.WEIGHT_QUANTIZER_KWARGS = {} # daasegt config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = Sequence([ ResizeWithJoints(image_size=config.IMAGE_SIZE), JointsToGaussianHeatmap(image_size=config.IMAGE_SIZE, stride=2), DivideBy255() ]) config.DATASET.BATCH_SIZE = config.BATCH_SIZE environment.init("test_lm_single_pose_v1") prepare_dirs(recreate=True) start_training(config, profile_step=1)
def test_training(): """Test only that no error raised.""" config = SmartDict() config.NETWORK_CLASS = SampleNetworkQuantize config.DATASET_CLASS = Dummy config.IS_DEBUG = False config.IMAGE_SIZE = [32, 32] config.BATCH_SIZE = 2 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.TASK = Tasks.CLASSIFICATION # network model config config.NETWORK = SmartDict() config.NETWORK.OPTIMIZER_CLASS = tf.train.AdamOptimizer config.NETWORK.OPTIMIZER_KWARGS = {"learning_rate": 0.001} config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE config.NETWORK.ACTIVATION_QUANTIZER = linear_mid_tread_half_quantizer config.NETWORK.ACTIVATION_QUANTIZER_KWARGS = {'bit': 2, 'max_value': 2} config.NETWORK.WEIGHT_QUANTIZER = binary_mean_scaling_quantizer config.NETWORK.WEIGHT_QUANTIZER_KWARGS = {} config.NETWORK.DATA_FORMAT = "NHWC" # dataset config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = Resize(config.IMAGE_SIZE) config.DATASET.BATCH_SIZE = config.BATCH_SIZE config.DATASET.DATA_FORMAT = "NHWC" environment.init("test_example_quantize") prepare_dirs(recreate=True) start_training(config, profile_step=1)
def test_training(): """Test only no error raised.""" config = SmartDict() config.NETWORK_CLASS = YoloV2Quantize config.DATASET_CLASS = Pascalvoc2007 config.IS_DEBUG = False config.IMAGE_SIZE = [128, 160] config.BATCH_SIZE = 2 config.TEST_STEPS = 1 config.MAX_STEPS = 2 config.SAVE_CHECKPOINT_STEPS = 1 config.KEEP_CHECKPOINT_MAX = 5 config.SUMMARISE_STEPS = 1 config.IS_PRETRAIN = False config.TASK = Tasks.OBJECT_DETECTION # network model config config.NETWORK = SmartDict() config.NETWORK.OPTIMIZER_CLASS = tf.train.AdamOptimizer config.NETWORK.OPTIMIZER_KWARGS = {"learning_rate": 0.001} config.NETWORK.IMAGE_SIZE = config.IMAGE_SIZE config.NETWORK.BATCH_SIZE = config.BATCH_SIZE config.NETWORK.ACTIVATION_QUANTIZER = linear_mid_tread_half_quantizer config.NETWORK.ACTIVATION_QUANTIZER_KWARGS = {'bit': 2, 'max_value': 2.0} config.NETWORK.WEIGHT_QUANTIZER = binary_channel_wise_mean_scaling_quantizer config.NETWORK.WEIGHT_QUANTIZER_KWARGS = {} # daasegt config config.DATASET = SmartDict() config.DATASET.PRE_PROCESSOR = ResizeWithGtBoxes(config.IMAGE_SIZE) config.DATASET.BATCH_SIZE = config.BATCH_SIZE environment.init("test_yolov_2_quantize") prepare_dirs(recreate=True) start_training(config, profile_step=1)