提交 94cebe4d 编写于 作者: Y yanghaitao1

fix sampler get_num_samples

上级 f1a004cf
...@@ -115,6 +115,8 @@ class Sampler: ...@@ -115,6 +115,8 @@ class Sampler:
return self.child_sampler.is_sharded() return self.child_sampler.is_sharded()
def get_num_samples(self): def get_num_samples(self):
if self.num_samples is None:
return None
return self._get_indices().size return self._get_indices().size
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册