GithubHelp home page GithubHelp logo

contrast_seg_paddle's Introduction

contrast_seg_paddle's People

Contributors

justld avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

contrast_seg_paddle's Issues

output_stride parameter

I have a confusion to consult you, can you explain this parameter output_stride? I don't understand how to ensure that the H and W dimensions of the two parameters of feats_****(embedding) and predict(seg) are the original input size when the backbone network is ResNet.

关于0维Tensor的代码修改请求

Hi,开发者你好,由于飞桨API之前对0维Tensor的支持不完善,通过shape为[1]的1D Tensor来替代shape为[]的0D Tensor,因此在很多本应输出0维tensor的场景中,实际输出的是1维tensor(如:loss)。目前飞桨计划全面支持0维tensor,在大多数情况下不会有不兼容问题,但也发现少量情况可能会报错。

目前发现 会报错 的代码是:loss.numpy()[0] 。原因是此前loss为1D Tensor(错误的语义),运行loss.numpy()[0]可以将其转化为python float数据。在loss被修改为0D Tensor(正确的语义)后,此操作会报错。需要将所有 loss.numpy()[0] 修改为 float(loss) ,以避免后续版本的代码错误。

因此请麻烦修改:

  • 对于shape为[1]的1维Tensor:Tensor.numpy()[0] 修改为 float(Tensor),对当前不会有影响,亦可适应未来变化。感谢贡献代码。

Hi, Developer, Due to the poor support for the 0D tensor in Paddle API. In many case, the output 1D tensor which shoulde be 0D Tensor (such as loss) are used by mistake. Paddle is plan to support 0D tensor fully, which will not cause incompatibility in most cases. However, it is also found that some code will report error.

This code is: loss.numpy()[0] 。 The reason is that the loss was 1D Tensor (wrong) before, it can be used as loss.numpy()[0]. After the loss is modified to 0D Tensor (correct), the operation will result in an error. Therefore, it is needed to modify loss.numpy()[0] to float(loss) , to avoid errors in future paddle version.

Therefore, please modify:

  • As for shape[1] Tensor: modify Tensor.numpy()[0] to float (Tensor) , It will not affect the current situation, but also adapt to future. Thank you for contributing code.

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.