We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3052a78 commit 6986773Copy full SHA for 6986773
1 file changed
deepmd/utils/data.py
@@ -339,12 +339,8 @@ def get_numb_set(self) -> int:
339
def get_numb_batch(self, batch_size: int, set_idx: int) -> int:
340
"""Get the number of batches in a set."""
341
set_name = self.dirs[set_idx]
342
- if isinstance(set_name, DPH5Path):
343
- data = self._load_set(set_name)
344
- nframes = data["coord"].shape[0]
345
- else:
346
- # Directly obtain the number of frames to avoid loading the entire dataset
347
- nframes = self._get_nframes(set_name)
+ # Directly obtain the number of frames to avoid loading the entire dataset
+ nframes = self._get_nframes(set_name)
348
ret = nframes // batch_size
349
if ret == 0:
350
ret = 1
0 commit comments