b34f36f02fe135e9d9a65bce4c300cf617273f3d,labs/06/3d_recognition.py,Network,evaluate,#Network#,101

Before Change


        self.session.run([self.training, self.summaries["train"]], {self.voxels: voxels, self.labels: labels, self.is_training: True})

    def evaluate(self, dataset, voxels, labels):
        accuracy, _ = self.session.run([self.accuracy, self.summaries[dataset]], {self.voxels: voxels, self.labels: labels, self.is_training: False})
        return accuracy

    def predict(self, voxels):

After Change


    def evaluate(self, dataset_name, dataset, batch_size):
        loss, accuracy = 0, 0

        while not dataset.epoch_finished():
            batch_voxels, batch_labels = dataset.next_batch(batch_size)
            batch_loss, batch_accuracy = self.session.run(
                [self.loss, self.accuracy], {self.voxels: batch_voxels, self.labels: batch_labels, self.is_training: False})
            loss += batch_loss * len(batch_labels) / len(dataset.voxels)
            accuracy += batch_accuracy * len(batch_labels) / len(dataset.voxels)
        self.session.run(self.summaries[dataset_name], {self.given_loss: loss, self.given_accuracy: accuracy})

        return accuracy
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ufal/npfl114
Commit Name: b34f36f02fe135e9d9a65bce4c300cf617273f3d
Time: 2018-04-09
Author: houskape@gmail.com
File Name: labs/06/3d_recognition.py
Class Name: Network
Method Name: evaluate


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 122c24b4aeb11ecba5f77c3bf5ef8f20f2167c77
Time: 2018-06-07
Author: eriklindernoren@gmail.com
File Name: utils/datasets.py
Class Name: ListDataset
Method Name: __getitem__


Project Name: mtobeiyf/audio-classification
Commit Name: 2f8b3e30e3deb3702ae79b5ef0c3bd84496dcfc5
Time: 2018-11-24
Author: mvrozanti@hotmail.com
File Name: feat_extract.py
Class Name:
Method Name: extract_feature