Giter VIP home page Giter VIP logo

Comments (8)

yufuhuang avatar yufuhuang commented on June 2, 2024

你好,我在跑代码的时候出现下面的一个问题,不知道该怎么解决,想向您请教
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

from understand_videobased_reid.

AsuradaYuci avatar AsuradaYuci commented on June 2, 2024

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

from understand_videobased_reid.

yufuhuang avatar yufuhuang commented on June 2, 2024

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

from understand_videobased_reid.

AsuradaYuci avatar AsuradaYuci commented on June 2, 2024

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

from understand_videobased_reid.

yufuhuang avatar yufuhuang commented on June 2, 2024

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

from understand_videobased_reid.

AsuradaYuci avatar AsuradaYuci commented on June 2, 2024

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

from understand_videobased_reid.

yufuhuang avatar yufuhuang commented on June 2, 2024

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

from understand_videobased_reid.

lqili avatar lqili commented on June 2, 2024

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

from understand_videobased_reid.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.