d9f34f7871d5f6a8109434c20f53ccb315ee33c1,niftynet/contrib/csv_reader/csv_reader.py,CSVReader,to_ohe,#CSVReader#Any#,29

Before Change


        return self
    
    def to_ohe(self, labels):
        return [np.eye(len(self.label_names))[self.label_names.index(label)] for label in labels]
    
    def layer_op(self, idx=None, shuffle=True):
        // def apply_expand_dims(x, n):

After Change


            tf.logging.fatal("Unrecognised input format for {}".format(self.path_to_csv))
    
    def to_ohe(self, labels):
        label_names = list(set(labels))
        return [np.eye(self._dims)[label_names.index(label)] for label in labels]
    
    def layer_op(self, idx=None, shuffle=True):
        if idx is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NifTK/NiftyNet
Commit Name: d9f34f7871d5f6a8109434c20f53ccb315ee33c1
Time: 2019-07-03
Author: thomas.varsavsky.15@ucl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: to_ohe


Project Name: NifTK/NiftyNet
Commit Name: ab7c70b3d7e47d11375bc770617c8c073d65a5dd
Time: 2019-06-05
Author: thomas.varsavsky.15@ucl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: to_ohe


Project Name: NifTK/NiftyNet
Commit Name: baecce5a6fbe4576ca8348a93dc56f07e7ba84f6
Time: 2019-06-05
Author: ucabtmv@ucl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: _parse_csv