630a400af2bffc27a173acf876d72a1a10cd2dbf,ilastik/applets/base/appletSerializer.py,SerialClassifierSlot,_deserialize,#SerialClassifierSlot#Any#Any#,501

Before Change


        // classfier data to a temporary file and give it to vigra.
        tmpDir = tempfile.mkdtemp()
        cachePath = os.path.join(tmpDir, "tmp_classifier_cache.h5").replace("\\", "/")
        with h5py.File(cachePath, "w") as cacheFile:
            cacheFile.copy(classifierGroup, self.name)

        forests = []

After Change


            from lazyflow.classifiers import ParallelVigraRfLazyflowClassifier
            classifier_type = ParallelVigraRfLazyflowClassifier
        
        try:
            classifier = classifier_type.deserialize_hdf5( classifierGroup )
        except:
            return

        // Now force the classifier into our classifier cache. The
        // downstream operators (e.g. the prediction operator) can
        // use the classifier without inducing it to be re-trained.
        // (This assumes that the classifier we are loading is
        // consistent with the images and labels that we just
        // loaded. As soon as training input changes, it will be
        // retrained.)
        self.cache.forceValue( classifier )

class SerialCountingSlot(SerialSlot):
    For saving a random forest classifier.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ilastik/ilastik
Commit Name: 630a400af2bffc27a173acf876d72a1a10cd2dbf
Time: 2014-05-08
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/base/appletSerializer.py
Class Name: SerialClassifierSlot
Method Name: _deserialize


Project Name: ilastik/ilastik
Commit Name: 371c36f48c81521283d7f261619298b853783d2b
Time: 2012-08-09
Author: bernhard.kausler@iwr.uni-heidelberg.de
File Name: tests/test_applets/batchIo/testOpBatchIo.py
Class Name: TestOpBatchIo
Method Name: testBasic


Project Name: ilastik/ilastik
Commit Name: 016900b1ee8ce9d97c553fed4969bd7b6ce658ae
Time: 2012-08-08
Author: bergs@janelia.hhmi.org
File Name: tests/test_applets/batchIo/testOpBatchIo.py
Class Name: TestOpBatchIo
Method Name: testBasic