d835c2656618fe0d227c7eb15eecb4847e8b6475,lazyflow/operators/obsolete/classifierOperators.py,OpPredictRandomForest,execute,#OpPredictRandomForest#Any#Any#Any#,211

Before Change


        nlabels=self.inputs["LabelsCount"].value

        RF=self.inputs["Classifier"].value
        assert RF.labelCount() == nlabels, "ERROR: OpPredictRandomForest, labelCount differs from true labelCount! %r vs. %r" % (RF.labelCount(), nlabels)

        newKey = key[:-1]
        newKey += (slice(0,self.inputs["Image"].shape[-1],None),)

After Change


        // If our LabelsCount is higher than the number of labels in the training set,
        // then our results aren"t really valid.
        // Duplicate the last label"s predictions
        chanslice = slice(min(key[-1].start, RF.labelCount()-1), min(key[-1].stop, RF.labelCount()))
        result[...]=prediction[...,chanslice]*255 // FIXME: This assumes that channel is the last axis

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: ilastik/ilastik
Commit Name: d835c2656618fe0d227c7eb15eecb4847e8b6475
Time: 2012-07-02
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/obsolete/classifierOperators.py
Class Name: OpPredictRandomForest
Method Name: execute


Project Name: AllenCellModeling/pytorch_fnet
Commit Name: 14db8e4673cbbfd58ffb01e4374d5c87d7e5b6e3
Time: 2017-11-01
Author: chek.o@outlook.com
File Name: tools/colorize_tifs.py
Class Name:
Method Name:


Project Name: rtqichen/torchdiffeq
Commit Name: b914816142ae2776f531be1c0b49812a0bfde91f
Time: 2020-08-04
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/adams.py
Class Name: VariableCoefficientAdamsBashforth
Method Name: __init__


Project Name: pytorch/fairseq
Commit Name: 77df83ab6e07468dbc8b31a5b84766f7fedd250d
Time: 2020-07-16
Author: myleott@fb.com
File Name: fairseq/distributed_utils.py
Class Name:
Method Name: call_main