コード例 #1
0
ファイル: model.py プロジェクト: kitfactory/ermine
 def prepare_option_infos(self) -> List[OptionInfo]:
     model = OptionInfo(name='Model',
                        direction=OptionDirection.OUTPUT,
                        values=['MODEL'])
     classes = OptionInfo(name='Class',
                          direction=OptionDirection.PARAMETER,
                          values=['10'])
     return [model, classes]
コード例 #2
0
 def prepare_option_infos(cls):
     model = OptionInfo(
         name='Model',
         direction=OptionDirection.OUTPUT,
         values=['MODEL'])
     size = OptionInfo(
         name='Size',
         direction=OptionDirection.PARAMETER,
         values=['28'])
     channel = OptionInfo(
         name='Channel',
         direction=OptionDirection.PARAMETER,
         values=['1'])
     return [model, size, channel]
コード例 #3
0
ファイル: model.py プロジェクト: kitfactory/ermine
 def prepare_option_infos(self) -> List[OptionInfo]:
     model = OptionInfo(name='Model',
                        direction=OptionDirection.OUTPUT,
                        values=['MODEL'])
     size = OptionInfo(name='Size',
                       direction=OptionDirection.PARAMETER,
                       values=['28'])
     channel = OptionInfo(name='Channel',
                          direction=OptionDirection.PARAMETER,
                          values=['1'])
     cls = OptionInfo(name='Class',
                      direction=OptionDirection.PARAMETER,
                      values=['10'])
     return [model, size, channel, cls]
コード例 #4
0
    def prepare_option_infos(self) -> List[OptionInfo]:
        src = OptionInfo(name='SrcModel',
                         direction=OptionDirection.INPUT,
                         values=['MODEL'])
        dest = OptionInfo(name='DestModel',
                          direction=OptionDirection.OUTPUT,
                          values=['MODEL'])
        optimizer = OptionInfo(name='Optimizer',
                               direction=OptionDirection.PARAMETER,
                               values=['SGD,Adam'])
        lr = OptionInfo(name='LearningRate',
                        direction=OptionDirection.PARAMETER,
                        values=['0.01'])

        return [src, dest, optimizer, lr]
コード例 #5
0
    def prepare_option_infos(self) -> List[OptionInfo]:
        src = OptionInfo(name='ModelFile',
                         direction=OptionDirection.INPUT,
                         values=['MODEL_FILE'])
        data = OptionInfo(name='TestDataset',
                          direction=OptionDirection.INPUT,
                          values=['TEST_DATASET'])

        size = OptionInfo(name='TestDatasetSize',
                          direction=OptionDirection.INPUT,
                          values=['TEST_DATASET_SIZE'])

        prediction_type = OptionInfo(name='Prediction',
                                     direction=OptionDirection.PARAMETER,
                                     values=['Multiple', 'Binarization'])

        bin_class = OptionInfo(name='Prediction.BinarizationClass',
                               direction=OptionDirection.PARAMETER,
                               values=['0'])

        bin_threshold = OptionInfo(name='Prediction.BinarizationThreshold',
                                   direction=OptionDirection.PARAMETER,
                                   values=['0.5'])

        return [src, data, size, prediction_type, bin_class, bin_threshold]
コード例 #6
0
    def prepare_option_infos(self) -> List[OptionInfo]:
        model = OptionInfo(name='Model',
                           direction=OptionDirection.INPUT,
                           values=['MODEL'])

        train = OptionInfo(name='TrainDataset',
                           direction=OptionDirection.INPUT,
                           values=['TRAIN_DATASET'])

        train_size = OptionInfo(name='TrainDatasetSize',
                                direction=OptionDirection.INPUT,
                                values=['TRAIN_DATASET_SIZE'])

        validation = OptionInfo(name='ValidaitonDataset',
                                direction=OptionDirection.INPUT,
                                values=['VALIDATION_DATASET'])

        validation_size = OptionInfo(name='ValidationDatasetSize',
                                     direction=OptionDirection.INPUT,
                                     values=['VALIDATION_DATASET_SIZE'])

        tensorboard = OptionInfo(name='TensorBoard',
                                 direction=OptionDirection.PARAMETER,
                                 values=['True', 'False'])

        trial_name = OptionInfo(name='TraialName',
                                direction=OptionDirection.PARAMETER,
                                values=['traial1'])

        early_stopping = OptionInfo(name='EarlyStopping',
                                    direction=OptionDirection.PARAMETER,
                                    values=['True', 'False'])

        early_stopping_patience = OptionInfo(
            name='EarlyStopping.Patience',
            direction=OptionDirection.PARAMETER,
            values=['5'])

        early_stopping_monitor = OptionInfo(
            name='EarlyStopping.Monitor',
            direction=OptionDirection.PARAMETER,
            values=['loss', 'val_loss'])

        check_point = OptionInfo(name='ModelCheckpoint',
                                 direction=OptionDirection.PARAMETER,
                                 values=['True', 'False'])

        check_point_save_best = OptionInfo(name='ModelCheckpoint.SaveBestOnly',
                                           direction=OptionDirection.PARAMETER,
                                           values=['True', 'False'])

        check_point_save_weigths_only = OptionInfo(
            name='ModelCheckpoint.SaveWeightsOnly',
            direction=OptionDirection.PARAMETER,
            values=['True', 'False'])

        check_point_file_path = OptionInfo(name='ModelCheckpoint.FilePath',
                                           direction=OptionDirection.PARAMETER,
                                           values=['weights.hdf5'])
        # values=['weights-{epoch:02d}-{val_loss:.2f}.hdf5'])

        max_epoch = OptionInfo(name='MaxEpoch',
                               direction=OptionDirection.PARAMETER,
                               values=['10'])

        batch = OptionInfo(name='BatchSize',
                           direction=OptionDirection.PARAMETER,
                           values=['100'])

        return [
            model, train, train_size, validation, validation_size, tensorboard,
            trial_name, early_stopping, early_stopping_patience,
            early_stopping_monitor, check_point, check_point_save_best,
            check_point_save_weigths_only, check_point_file_path, max_epoch,
            batch
        ]