understand_videobased_reid icon indicating copy to clipboard operation
understand_videobased_reid copied to clipboard

sample_method dense mean all ?

Open swg209 opened this issue 5 years ago • 8 comments

elif self.sample == 'dense': """ Sample all frames in a video into a list of clips, each clip contains seq_len frames, batch_size needs to be set to 1. 将视频中的所有帧采样到一系列的clips,每个clip包含seq_len个帧,批次大小需要设置为1 This sampling strategy is used in test phase. 在测试阶段采用密集采样策略. """

你好,我想问一下 dense的取样方式 是不是类似于 把 整个tracklet 划分成 多个 seq_length长的clip ?

swg209 avatar Apr 04 '19 10:04 swg209

你好,我在跑代码的时候出现下面的一个问题,不知道该怎么解决,想向您请教 RuntimeError: invalid argument 1: cannot perform reduction function min on tensor with no elements because the operation does not have an identity at C:/w/1/s/tmp_conda_3.7_104508/conda/conda-bld/pytorch_1572950778684/work/aten/src\THC/generic/THCTensorMathReduce.cu:64

yufuhuang avatar Nov 17 '19 08:11 yufuhuang

@yufuhuang 不知道这个错误出现在哪句代码中,可能与pytorch或者python的版本有关,作者用的应该是pytorch0.4.0。。。

AsuradaYuci avatar Nov 17 '19 08:11 AsuradaYuci

@AsuradaYuci 代码中报错的是在loss.py中,即dist_an.append(dist[i][mask[i] == 0].min()), 为什么就会报错“无效参数1:无法在没有元素的张量上执行归约函数min”?十分感谢

yufuhuang avatar Nov 19 '19 12:11 yufuhuang

@yufuhuang 请问你的pytorch版本是多少,0.4.0的没有问题,比这版本高可能存在问题

AsuradaYuci avatar Nov 20 '19 01:11 AsuradaYuci

@AsuradaYuci 你的pytorch版本是0.4.0.请问你的python版本是多少呢?我pytorch版本改成0.4.0,但是还是报错

yufuhuang avatar Nov 22 '19 13:11 yufuhuang

@yufuhuang dist_an.append(dist[i][mask[i] == 0].min().unsqueeze(0))

AsuradaYuci avatar Nov 23 '19 10:11 AsuradaYuci

@AsuradaYuci 你好 上述问题都是torch版本的问题 我改成了0.3.1 上述问题成功解决 但是在测试的时候又出现了 last_seq.append(index) AttributeError: 'range' object has no attribute 'append’

yufuhuang avatar Dec 15 '19 09:12 yufuhuang

@yufuhuang range 这个问题应该是python版本不同的问题,原作者是使用2.7 ,在3版本里range需要list(range()),

lqili avatar Dec 17 '19 13:12 lqili