79a3ce9a6c529774d266922fd0b447bf57a8d039,src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py,GridSearchTuner,_parse_quniform,#GridSearchTuner#Any#,96

Before Change



    def _parse_quniform(self, param_value):
        """parse type of quniform parameter and return a list"""
        if param_value[2] < 2:
            raise RuntimeError("The number of values sampled (q) should be at least 2")
        low, high, count = param_value[0], param_value[1], param_value[2]
        interval = (high - low) / (count - 1)
        return [float(low + interval * i) for i in range(count)]

After Change


    def _parse_quniform(self, param_value):
        """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_qtype(self, param_type, param_value):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Microsoft/nni
Commit Name: 79a3ce9a6c529774d266922fd0b447bf57a8d039
Time: 2019-07-27
Author: suiguoxin@gmail.com
File Name: src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
Class Name: GridSearchTuner
Method Name: _parse_quniform


Project Name: p2irc/deepplantphenomics
Commit Name: 8abfc14b8b1a8a82ab09a8cabccf26332ce94b46
Time: 2018-05-16
Author: nicoreekohiggs@gmail.com
File Name: deepplantphenomics/deepplantpheno.py
Class Name: DPPModel
Method Name: forward_pass_with_file_inputs


Project Name: pyprob/pyprob
Commit Name: 1c758ba9d6c14d9b9d3599e44c3508e2692d8d35
Time: 2018-09-28
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/distributions/empirical.py
Class Name: Empirical
Method Name: sample