def get_all_batches_for_evaluation(self, batch_size, class_id):
    assert (self.images.shape[0] == self.voxels.shape[0])
    ci = self.class_ids.index(class_id)
    ind_ci = (self.labels == ci)
    im_cls = self.images[ind_ci]
    vx_cls = self.voxels[ind_ci]
    data_ids = np.arange(im_cls.shape[0])
    viewpoint_ids = np.tile(np.arange(24), data_ids.size)
    data_ids = ((np.repeat(data_ids, 24) * 24) + viewpoint_ids)
    distances = (torch.ones(data_ids.size).float() * self.distance)
    elevations = (torch.ones(data_ids.size).float() * self.elevation)
    viewpoints_all = srf.get_points_from_angles(distances, elevations, ((- torch.from_numpy(viewpoint_ids).float()) * 15))
    shape = im_cls.shape[(- 3):]
    images = im_cls.view((- 1), *shape)
    shape = vx_cls.shape[(- 3):]
    voxels = vx_cls.view((- 1), *shape)
    for i in range((((data_ids.size - 1) // batch_size) + 1)):
        im = images[data_ids[(i * batch_size):((i + 1) * batch_size)]]
        vx = voxels[(data_ids[(i * batch_size):((i + 1) * batch_size)] // 24)]
        (yield (im, vx))
def get_all_batches_for_evaluation(self, batch_size, class_id):
    assert (self.images.shape[0] == self.voxels.shape[0])
    ci = self.class_ids.index(class_id)
    ind_ci = (self.labels == ci)
    im_cls = self.images[ind_ci]
    vx_cls = self.voxels[ind_ci]
    data_ids = np.arange(im_cls.shape[0])
    viewpoint_ids = np.tile(np.arange(24), data_ids.size)
    data_ids = ((np.repeat(data_ids, 24) * 24) + viewpoint_ids)
    distances = (torch.ones(data_ids.size).float() * self.distance)
    elevations = (torch.ones(data_ids.size).float() * self.elevation)
    viewpoints_all = srf.get_points_from_angles(distances, elevations, ((- torch.from_numpy(viewpoint_ids).float()) * 15))
    shape = im_cls.shape[(- 3):]
    images = im_cls.view((- 1), *shape)
    shape = vx_cls.shape[(- 3):]
    voxels = vx_cls.view((- 1), *shape)
    for i in range((((data_ids.size - 1) // batch_size) + 1)):
        im = images[data_ids[(i * batch_size):((i + 1) * batch_size)]]
        vx = voxels[(data_ids[(i * batch_size):((i + 1) * batch_size)] // 24)]
        (yield (im, vx))