Giter Club home page Giter Club logo

Comments (5)

orhunguley avatar orhunguley commented on May 26, 2024 1

Hi @sarthakpati , yes it fixed the issue as well. Thanks!

from gandlf.

orhunguley avatar orhunguley commented on May 26, 2024

Hi @sarthakpati , I also encountered this error end fix it by changing that line to:

label = label.reshape(image.shape[0], len(params["value_keys"]))

from gandlf.

sarthakpati avatar sarthakpati commented on May 26, 2024

What is the rationale behind using image.shape[0]?

from gandlf.

orhunguley avatar orhunguley commented on May 26, 2024

Because the last batch coming from data loader is not equal to batch size, but it is equal to the number of remaining images. For example I was getting the error because in the last iteration the batch size was 43, but it was trying to reshape it assuming that it is 64.

from gandlf.

sarthakpati avatar sarthakpati commented on May 26, 2024

I understand. Would the commit fa70a18 fix your issue as well? I tried it with different scenarios and it seemed to work as expected.

from gandlf.

Related Issues (20)

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.