Exemplo n.º 1
0
def check_config(config):
    """
    Check config
    """
    check.check_version()
    use_gpu = config.get('use_gpu', True)
    if use_gpu:
        check.check_gpu()
    architecture = config.get('ARCHITECTURE')
    #check.check_architecture(architecture)
    use_mix = config.get('use_mix', False)
    check.check_mix(architecture, use_mix)
    classes_num = config.get('classes_num')
    check.check_classes_num(classes_num)
    mode = config.get('mode', 'train')
    if mode.lower() == 'train':
        check.check_function_params(config, 'LEARNING_RATE')
        check.check_function_params(config, 'OPTIMIZER')
Exemplo n.º 2
0
def check_config(config):
    """
    Check config
    """
    check.check_version()

    mode = config.get('mode', 'train')
    check.check_gpu()

    architecture = config.get('architecture')
    check.check_architecture(architecture)

    use_mix = config.get('use_mix')
    check.check_mix(architecture, use_mix)

    classes_num = config.get('classes_num')
    check.check_classes_num(classes_num)

    if mode.lower() == 'train':
        check.check_function_params(config, 'LEARNING_RATE')
        check.check_function_params(config, 'OPTIMIZER')