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"""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: DT42/BerryNet
Commit Name: 1a4afd3eb200e41706b67497bdc94261263147ee
Time: 2018-02-19
Author: bofu@dt42.io
File Name: berrynet/engine/movidius.py
Class Name:
Method Name: process_inceptionv3_output


Project Name: NifTK/NiftyNet
Commit Name: a59350bf9cc20c9e02e2397d31bbf87848db8f9e
Time: 2017-10-19
Author: carole.sudre.12@ucl.ac.uk
File Name: niftynet/evaluation/region_properties.py
Class Name: RegionProperties
Method Name: glcm