summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2020-12-27 15:38:18 +0800
committerJordan Gong <jordan.gong@protonmail.com>2020-12-27 15:38:18 +0800
commit343e2311b48b900c07072849570f82a5b90d2aa7 (patch)
tree2c3274b1b09151b35f4376425811ef4ed468d7f6
parent27fb972354c69bf61845ae21f842855e762318d8 (diff)
Prepare for FVG dataset
-rw-r--r--utils/sampler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/sampler.py b/utils/sampler.py
index 0a177d1..cdf1984 100644
--- a/utils/sampler.py
+++ b/utils/sampler.py
@@ -1,5 +1,6 @@
import random
from collections.abc import Iterator
+from typing import Union
import numpy as np
from torch.utils import data
@@ -10,7 +11,7 @@ from utils.dataset import CASIAB
class TripletSampler(data.Sampler):
def __init__(
self,
- data_source: CASIAB,
+ data_source: Union[CASIAB],
batch_size: tuple[int, int]
):
super().__init__(data_source)