def build_network(): if model == 'resnet': network = resnet_v1(resnet_depth=model_depth, num_classes=n_classes, data_format=data_format) return network(inputs=features, is_training=(mode == tf.estimator.ModeKeys.TRAIN)) elif model == 'densenet': if model_depth == 121: return densenet_imagenet_121( features, is_training=(mode == tf.estimator.ModeKeys.TRAIN), num_classes=n_classes) elif model_depth == 169: return densenet_imagenet_169( features, is_training=(mode == tf.estimator.ModeKeys.TRAIN), num_classes=n_classes) elif model_depth == 201: return densenet_imagenet_201( features, is_training=(mode == tf.estimator.ModeKeys.TRAIN), num_classes=n_classes) else: raise Exception(f'Unkown densenet model depth: {model_depth}') else: raise Exception(f'Unknown model: {model}')
def build_network(): network = resnet_v1( resnet_depth=resnet_depth, num_classes=n_classes, data_format=data_format) return network( inputs=features, is_training=(mode == tf.estimator.ModeKeys.TRAIN))
def build_network(): network = resnet_v1(resnet_depth=resnet_depth, num_classes=n_classes, data_format=data_format) return network(inputs=image, cell=one_hot_cell, well_type=one_hot_well, is_training=(mode == tf.estimator.ModeKeys.TRAIN))