eee44cb44984b803a0c4a0e6a2b41b48b200989e,lazyflow/classifiers/pytorchLazyflowClassifier.py,PyTorchLazyflowClassifier,predict_probabilities_pixelwise,#PyTorchLazyflowClassifier#Any#Any#Any#,105

Before Change


                // logger.warning("Dumping to {}".format(""/Users/chaubold/Desktop/dump.h5""))
                // vigra.impex.writeHDF5(reordered_feature_image[z,...], "data", "/Users/chaubold/Desktop/dump.h5")
                result_slice = self._pytorch_net.forward([reordered_feature_image[z:z+1,...]])[0]
                logger.info("Resulting slice {} has shape {}".format(z, result_slice.shape))
                result[z, 0, ...] = result_slice

            logger.info("Obtained a predicted block of shape {}".format(result.shape))
            

After Change


                // vigra.impex.writeHDF5(reordered_feature_image[z,...], "data", "/Users/chaubold/Desktop/dump.h5")

                // create batch of desired num slices. Multiple slices can be processed on multiple GPUs!
                batch = [reordered_feature_image[zi:zi+1,...] for zi in range(z, min(z+self.BATCH_SIZE, reordered_feature_image.shape[0]))]

                result_batch = self._pytorch_net.forward(batch)
                logger.info("Resulting slices from {} to {} have shape {}".format(z, z+len(batch), result_batch[0].shape))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ilastik/ilastik
Commit Name: eee44cb44984b803a0c4a0e6a2b41b48b200989e
Time: 2018-11-26
Author: carstenhaubold@googlemail.com
File Name: lazyflow/classifiers/pytorchLazyflowClassifier.py
Class Name: PyTorchLazyflowClassifier
Method Name: predict_probabilities_pixelwise


Project Name: deepdrive/deepdrive
Commit Name: b54e99fb4c6b3d513c4eecc11b27fadafef91a4a
Time: 2018-05-29
Author: cquiter@gmail.com
File Name: agents/dagger/agent.py
Class Name: Agent
Method Name: get_next_action


Project Name: ilastik/ilastik
Commit Name: 31987e99d495f8eafc83fa5294be44a746c51e19
Time: 2018-04-25
Author: carstenhaubold@googlemail.com
File Name: lazyflow/classifiers/pytorchLazyflowClassifier.py
Class Name: PyTorchLazyflowClassifier
Method Name: predict_probabilities_pixelwise