Giter VIP home page Giter VIP logo

Comments (2)

rshih32 avatar rshih32 commented on June 15, 2024

Makes sense, if anything, I would move the matplotlib assumption above the choosing any single dimension, since that one is more arbitrary and kind of a last ditch naive approach.

from trulens.

klasleino avatar klasleino commented on June 15, 2024

I would move the matplotlib assumption above the choosing any single dimension, since that one is more arbitrary and kind of a last ditch naive approach.

My thinking was that this ordering would lead to the greatest convenience. Basically, I like to use the Tiler class as a convenient for visualizing training data, even if I'm not using other TruLens features.

If we use the matplotlib assumption, then we will always pick (I think) the last dimension as the channel dimension (so we'll never reach any other cases in our "switch statement" suggested above). This is standard in tensorflow, but not pytorch. So if the user is using pytorch, or keras with 'channels_first', they may have some data that they would like to visualize that is naturally in NCHW format. In that case, they would have to transpose the dimensions before sending it to the tiler. On the other hand, this data would probably have a shape of something like (n, 3, x, y), in which case we could infer that dimension 1 is the channel dimension, as long as y doesn't happen to be 3. This would make it so that NCHW users could use the tiler with their preferred format without having to "know" that matplotlib wants NHWC format, and also without having to specify the backend to TruLens.

If it happens to be ambiguous for some reason we could warn them that we're using the default of NHWC.

from trulens.

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.