diff options
| author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-19 22:43:17 +0800 | 
|---|---|---|
| committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-19 22:43:17 +0800 | 
| commit | 4049566103a00aa6d5a0b1f73569bdc5435714ca (patch) | |
| tree | d84604773f05eab030ff2106c43cb2c091b6e8fc /utils/sampler.py | |
| parent | d12dd6b04a4e7c2b1ee43ab6f36f25d0c35ca364 (diff) | |
| parent | 969030864495e7c2b419400fd81ee0fad83de41e (diff) | |
Merge branch 'python3.8' into disentangling_only_py3.8
# Conflicts:
#	models/hpm.py
#	models/layers.py
#	models/model.py
#	models/part_net.py
#	models/rgb_part_net.py
#	utils/configuration.py
Diffstat (limited to 'utils/sampler.py')
| -rw-r--r-- | utils/sampler.py | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/sampler.py b/utils/sampler.py index cdf1984..0977f94 100644 --- a/utils/sampler.py +++ b/utils/sampler.py @@ -1,6 +1,5 @@  import random -from collections.abc import Iterator -from typing import Union +from typing import Union, Tuple, Iterator  import numpy as np  from torch.utils import data @@ -12,7 +11,7 @@ class TripletSampler(data.Sampler):      def __init__(              self,              data_source: Union[CASIAB], -            batch_size: tuple[int, int] +            batch_size: Tuple[int, int]      ):          super().__init__(data_source)          self.metadata_labels = data_source.metadata['labels']  | 
