diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-15 12:06:45 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-15 12:09:14 +0800 |
commit | 6a4f1cdb88d1853beb410b9da29e43069688dba7 (patch) | |
tree | 6ff66d9cfa290b3f8831580f46a526dc8325a691 /utils/sampler.py | |
parent | cf59a1f8339e937e31281907a61f484af99ce955 (diff) | |
parent | 24b5968bfc5799e44c9bbbc00e3a9be00f4509ac (diff) |
Merge branch 'python3.8' into data_parallel_py3.8
# Conflicts:
# models/model.py
# models/rgb_part_net.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'] |