Comments (11)
Yes, and please have a test on the function before PR.
from tensorboardx.
Ok, I think I understand what is happening. according to the tensorboard embedding doc
The sprite should have the same number of rows and columns
There is no such control in the code right now, and this explains why TB is link wrong images and labels (although it is a poor implementation from them to expect a squared image IMHO) . In fact if you:
- Get the images number
n_i
- Find the minimum squared sprite dimensions which can hold the images using
(int(ceil(n_i**0.5))))**2
- Concat black images at the end of the valid images
- Call
make_grid
using the square root size (which now does exist as integer)
Everything should works. You can see the different results for a batch of 10 images below
The first one produces wrong association, while the second one works!
from tensorboardx.
great!
But I think you should fix:
https://github.com/lanpa/tensorboard-pytorch/blob/master/tensorboard/embedding.py#L15
and make nrow
correct.
Would you like to send a PR?
from tensorboardx.
I' m working on that function indeed. Just one question:
- What is the use of
xx
?
from tensorboardx.
https://github.com/lanpa/tensorboard-pytorch/blob/master/tensorboard/embedding.py#L17
Just a dirty fix for torchvision. lol
from tensorboardx.
I make a PR as soon as I learn how it works :D
from tensorboardx.
changing nrow = int(math.floor(math.sqrt(label_img.size(0))))
to nrow = int(math.ceil(math.sqrt(label_img.size(0))))
would be OK. Am I right?
from tensorboardx.
no, beacuse you also have to concat black images to the original ones.
Should i fork the repo and then make a pr?
from tensorboardx.
I'm getting an unexpected behaviour...the label are linked correctly, but the images of the first column (except for the first element, i.e m[0,0] ) are shown as black. Any idea?
7 and 4 are black.
I've checked the dimension of the output of make_grid to find that somehow a pixel get append in both size, maybe the problem is there (which explain some of your fixes btw)
from tensorboardx.
Fixed and PR made :)
from tensorboardx.
Should work now. Thanks!
from tensorboardx.
Related Issues (20)
- tensorboardX is incompatible with protobuf 4.21.0 HOT 16
- draw NaN with triangle
- Subsequent hparams missing HOT 4
- DeprecationWarning: crc32c.crc32 will be eventually removed, use crc32c.crc32c instead HOT 2
- AttributeError: 'NoneType' object has no attribute 'get_logdir' HOT 3
- Protobuf version HOT 4
- How can I connect previous log file into new one in tensorboard HOT 1
- How can i read tensorboard by python ? HOT 2
- Deprecation Warnings HOT 15
- OSS License compatibility question
- Remove upper pins on protobuf HOT 4
- tensorboardX is converting white/blank space and other non alphanumeric characters to underscore
- Update unittests for newer protobuf
- Possibility of v2.5.2 with upper pin on protobuf of <4? HOT 3
- The license_file parameter is deprecated HOT 3
- Loosening protobuf version limit breaking downstream packages HOT 7
- Is there an efficient way to log line plots? HOT 5
- EOFError multiprocessing HOT 1
- Set experiment name when using CometML HOT 1
- Support add_mesh for visdom writer?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorboardx.