afb4e78c5c9c4782482777fd8587c636711ab2e5,src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py,GridSearchTuner,_parse_quniform,#GridSearchTuner#Any#,98

Before Change


        """parse type of quniform parameter and return a list"""
        low, high, interval = param_value[0], param_value[1], param_value[2]
        count = int(np.floor((high - low) / interval)) + 1
        return [low + interval * i for i in range(count)]

    def _parse_randint(self, param_value):
        """parse type of randint parameter and return a list"""
        return np.arange(param_value[0], param_value[1]).tolist()

After Change


    def _parse_quniform(self, param_value):
        """parse type of quniform parameter and return a list"""
        low, high, q = param_value[0], param_value[1], param_value[2]
        return np.clip(np.arange(np.round(low/q), np.round(high/q)+1) * q, low, high)

    def _parse_randint(self, param_value):
        """parse type of randint parameter and return a list"""
        return np.arange(param_value[0], param_value[1]).tolist()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Microsoft/nni
Commit Name: afb4e78c5c9c4782482777fd8587c636711ab2e5
Time: 2019-08-04
Author: suiguoxin@gmail.com
File Name: src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
Class Name: GridSearchTuner
Method Name: _parse_quniform


Project Name: ClementPinard/SfmLearner-Pytorch
Commit Name: 1a55589989981eca04d228127878b500fb7a8a12
Time: 2018-03-13
Author: clement.pinard@parrot.com
File Name: kitti_eval/depth_evaluation_utils.py
Class Name:
Method Name: read_scene_data


Project Name: tiberiu44/TTS-Cube
Commit Name: 288e2868ce5f35a9c8ecf3e3fa913f293adcf7e7
Time: 2018-10-31
Author: boros@adobe.com
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: learn