You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
作者你好,请问NR_IMAGE_PER EPOCH训练图像对的数量应该随数据集怎样取值?以及max_diff这个参数的具体意义是图像对的最大相对距离吗?但是以下实现的代码并不是此意思,是否代码有误?
def _sample_pair_idx_pair_within_max_diff(self, L, max_diff):
r"""
Draw a pair of index in range(L) within a given maximum difference
Arguments
---------
L: int
difference
max_diff: int
difference
"""
rng = self._state["rng"]
idx1 = rng.choice(L)
idx2_choices = list(range(idx1-max_diff, L)) +
list(range(L+1, idx1+max_diff+1))
idx2_choices = list(set(idx2_choices).intersection(set(range(L))))
idx2 = rng.choice(idx2_choices)
return int(idx1), int(idx2)
The text was updated successfully, but these errors were encountered:
作者你好,请问NR_IMAGE_PER EPOCH训练图像对的数量应该随数据集怎样取值?以及max_diff这个参数的具体意义是图像对的最大相对距离吗?但是以下实现的代码并不是此意思,是否代码有误?
def _sample_pair_idx_pair_within_max_diff(self, L, max_diff):
r"""
Draw a pair of index in range(L) within a given maximum difference
Arguments
---------
L: int
difference
max_diff: int
difference
"""
rng = self._state["rng"]
idx1 = rng.choice(L)
idx2_choices = list(range(idx1-max_diff, L)) +
list(range(L+1, idx1+max_diff+1))
idx2_choices = list(set(idx2_choices).intersection(set(range(L))))
idx2 = rng.choice(idx2_choices)
return int(idx1), int(idx2)
The text was updated successfully, but these errors were encountered: