Beispiel #1
0
    def comparison_run(cls, runScale='full', dataScale='full_2occupations', useCPU = True):

        numSeqs = EmbeddingDataReader(EmbeddingDataReader.premade_sources()[dataScale], 'bucketing', 100, 40, padToFull=True).maxXLen

        params = [('initialLearningRate', [1e-3]),
                  ('l2RegLambda', [1e-4]),
                  ('maxNumSeqs', [numSeqs]),

                  ('rnnCellUnitsNProbs', [([32, 32, 32], [.5]*3)]),

                  ('convFilterSizesNKeepProbs', [([2, 3, 4], [.5]*3)]),
                  ('convNumFeaturesPerFilter', [8]),

                  ('pooledKeepProb', [0.5])]

        cls.run_thru_data(EmbeddingDataReader, dataScale, make_params_dict(params), runScale, useCPU, padToFull=True)
Beispiel #2
0
    def quick_run(cls, runScale ='basic', dataScale='tiny_fake_2', useCPU = True):

        numSeqs = EmbeddingDataReader(EmbeddingDataReader.premade_sources()[dataScale], 'bucketing', 100, 40, padToFull=True).maxXLen

        params = [('initialLearningRate', [1e-3]),
                  ('l2RegLambda', [0]),
                  ('maxNumSeqs', [numSeqs]),

                  ('rnnCellUnitsNProbs', [([3], [0.9])
                                          ]),

                  ('convFilterSizesNKeepProbs', [([2], [1.])
                                                 ]),
                  ('convNumFeaturesPerFilter', [4]),

                  ('pooledKeepProb', [1])]

        cls.run_thru_data(EmbeddingDataReader, dataScale, make_params_dict(params), runScale, useCPU, padToFull=True)
Beispiel #3
0
    def quick_learn(cls,
                    runScale='small',
                    dataScale='small_2occupations',
                    useCPU=True):
        numSeqs = EmbeddingDataReader(
            EmbeddingDataReader.premade_sources()[dataScale],
            'bucketing',
            100,
            40,
            padToFull=True).maxXLen

        params = [('initialLearningRate', [1e-3]), ('l2RegLambda', [0]),
                  ('maxNumSeqs', [numSeqs]), ('filterSizes', [[2, 4]]),
                  ('numFeaturesPerFilter', [3]), ('pooledKeepProb', [1])]

        cls.run_thru_data(EmbeddingDataReader,
                          dataScale,
                          make_params_dict(params),
                          runScale,
                          useCPU,
                          padToFull=True)
    def comparison_run(cls,
                       runScale='medium',
                       dataScale='full_2occupations',
                       useCPU=True):
        numSeqs = EmbeddingDataReader(
            EmbeddingDataReader.premade_sources()[dataScale],
            'bucketing',
            100,
            40,
            padToFull=True).maxXLen

        params = [('initialLearningRate', [1e-3]), ('l2RegLambda', [1e-6]),
                  ('maxNumSeqs', [numSeqs]),
                  ('filterSizesNKeepProbs', [([1, 2, 3,
                                               4], [0.9, 0.9, 0.9, 0.9])]),
                  ('numFeaturesPerFilter', [128]),
                  ('pooledKeepProb', [0.5, 0.85, 1])]

        cls.run_thru_data(EmbeddingDataReader,
                          dataScale,
                          make_params_dict(params),
                          runScale,
                          useCPU,
                          padToFull=True)
Beispiel #5
0
    def quick_learn(cls,
                    runScale='small',
                    dataScale='small_2occupations',
                    useCPU=True):

        numSeqs = EmbeddingDataReader(
            EmbeddingDataReader.premade_sources()[dataScale],
            'bucketing',
            100,
            40,
            padToFull=True).maxXLen

        params = [('initialLearningRate', [1e-3]), ('l2RegLambda', [1e-4]),
                  ('maxNumSeqs', [numSeqs]),
                  ('convFilterShapesNKeepProbs', [([(3, -1)], [1])]),
                  ('convNumFeaturesPerFilter', [32]),
                  ('rnnCellUnitsNProbs', [([16], [0.9])])]

        cls.run_thru_data(EmbeddingDataReader,
                          dataScale,
                          make_params_dict(params),
                          runScale,
                          useCPU,
                          padToFull=True)