Coder Social home page Coder Social logo

Comments (4)

ToucheSir avatar ToucheSir commented on May 18, 2024 1

size is defined to return a tuple, instead of a single int, so almost. I'd have a look at the docs/REPL help for size and try it out on a couple of different AbstractVector subtypes to get a feel for how it should be implemented.

from flux.jl.

mcabbott avatar mcabbott commented on May 18, 2024 1

Note BTW that the code for this lives in MLUtils.jl, not in the Flux.jl repository: https://github.com/JuliaML/MLUtils.jl/blob/main/src/eachobs.jl#L186

Should be an easy PR to add this, Base.size(d::DataLoader) = (length(d),) and a test.

At least if I'm thinking correctly. The size should always be the size of collect(d), and this will always be a 1-dimensional container, Vector, I think.

from flux.jl.

re1san avatar re1san commented on May 18, 2024 1

Where should the tests be added? Should it be added in https://github.com/JuliaML/MLUtils.jl/blob/main/test/dataloader.jl?

from flux.jl.

re1san avatar re1san commented on May 18, 2024

Hey, I would like to work on it. If I am understanding it correctly there should be a function Base.size(d::DataLoader) that returns the same thing as length right?

from flux.jl.

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.