Code Monkey home page Code Monkey logo

Comments (6)

greaber avatar greaber commented on April 27, 2024 1

Thanks. For now I guess I will just stick to 'doane' since I don't want to hand set the binning for each parameter. Actually, I am finding the distributions tab more useful than the histograms tab for my puproses anyway (basically I am interested in monitoring spiking gradients that require clipping and maybe also gradients going to zero). We can close this issue if you want. There is definitely some buggy behavior with the default binning, but if tensorboard is doing the binning by default I guess it is probably a tensorboard issue.

from tensorboardx.

lanpa avatar lanpa commented on April 27, 2024

http://tensorboard-pytorch.readthedocs.io/en/latest/tensorboard.html#tensorboardX.SummaryWriter.add_histogram

Hi, will additional parameter bins=range(...) help?

from tensorboardx.

greaber avatar greaber commented on April 27, 2024

I didn't try this exactly, but I tried some of the string values for bins listed in the numpy docs. Setting bins='auto' causes the program to crash with MemoryError coming from a call to np.zeros (even though the machine has plenty of memory). Setting bins='sturges' fixes the problem and leads to nice histograms. But it is pretty strange; I can't think of anything really unusual about my usage that would make the default and 'auto' histograms fail for me if they aren't broken for everyone else.

from tensorboardx.

greaber avatar greaber commented on April 27, 2024

Actually 'sturges' doesn't do that great of a job. It uses too few bins and doesn't zoom in enough. But at least it is not completely wrong like the default histograms.
image

from tensorboardx.

greaber avatar greaber commented on April 27, 2024

I also tried 'doane' and 'fd'. doane seems about the same as sturges, and fd crashes with a memory error like auto. Maybe the sturges/doane behavior is reasonable in that my distributions are very sharply peaked about zero..

from tensorboardx.

lanpa avatar lanpa commented on April 27, 2024

Using auto will explode the memory (should be numpy bug). see #1 . From you last graph, I think bins=np.arange(-0.003, 0.003, 0.0001) might do the work.

from tensorboardx.

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.