mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 23:30:35 +08:00
Using the new dataset idx API everywhere.
Summary: Using the API from D35012121 everywhere. Reviewed By: bottler Differential Revision: D35045870 fbshipit-source-id: dab112b5e04160334859bbe8fa2366344b6e0f70
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c0bb49b5f6
commit
e2622d79c0
@@ -8,6 +8,7 @@
|
||||
import contextlib
|
||||
import copy
|
||||
import dataclasses
|
||||
import itertools
|
||||
import math
|
||||
import os
|
||||
import unittest
|
||||
@@ -285,6 +286,7 @@ class TestEvaluation(unittest.TestCase):
|
||||
|
||||
def test_full_eval(self, n_sequences=5):
|
||||
"""Test evaluation."""
|
||||
for _, idx in list(self.dataset.seq_to_idx.items())[:n_sequences]:
|
||||
for seq in itertools.islice(self.dataset.sequence_names(), n_sequences):
|
||||
idx = list(self.dataset.sequence_indices_in_order(seq))
|
||||
seq_dataset = torch.utils.data.Subset(self.dataset, idx)
|
||||
self._one_sequence_test(seq_dataset)
|
||||
|
||||
Reference in New Issue
Block a user