lanpa / tensorboardx Goto Github PK
View Code? Open in Web Editor NEWtensorboard for pytorch (and chainer, mxnet, numpy, ...)
Home Page: https://tensorboardx.readthedocs.io/en/latest/tensorboard.html
License: MIT License
tensorboard for pytorch (and chainer, mxnet, numpy, ...)
Home Page: https://tensorboardx.readthedocs.io/en/latest/tensorboard.html
License: MIT License
It's me again :)
I'm running some embedding visualization on the MNIST dataset.
My metadata.tsv
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
6
6
6
6
6
6
6
6
7
7
7
7
7
7
7
7
8
8
8
8
8
8
8
8
9
9
9
9
9
9
9
9
How can this possibly happen :) ?
I've checked the tensorboard doc and everything seems disposed as requested..
Hi, I am having problems plotting histograms. I think there is a very good chance that it is not because of a bug in tensorboard-pytorch, but I'm not sure what I could be doing wrong, and I'm not sure where to ask, so if someone could help I would appreciate it.
I am trying to plot histograms of the gradients like this:
loss.backward()
for n, p in filter(lambda np: np[1].grad is not None, spectral_model.named_parameters()):
print(n, p.grad.data.min(), p.grad.data.max())
summary_writer.add_histogram(n, p.grad.data.cpu().numpy(), global_step=step)
The mins and maxes show that the values are all between -.15 and .15 (and in fact most values are much closer to zero than that). But the histograms seem to show that all the values are located at one extremely high value, like 3.01e+18:
there's a conflict with package names at loading time when you install the standalone version of tensorboard from: https://github.com/dmlc/tensorboard
The use case is to not have to install tensorflow, since that's whole point of using pytorch. Any workaround for this? I'd would be more intuitive to rename the module to tensorboard-pytorch
Hi, thanks for your great work.
When I add network's parameters to histogram via:
for name, param in resnet18.named_parameters():
writer.add_histogram(name, param.clone().cpu().data.numpy(), n_iter)
The histograms showed in tensorboard are always a peak triangles. I have tried the mnist and vae examples from https://github.com/pytorch/examples
. Histograms are always triangles.
I am currently working on packaging tensorboardX for https://conda-forge.org/ and for the AUR.
For making a package, we generally need either an sdist of a released version or a tagged release on Github (or even better: both).
This shouldn't be much work and doesn't break anything:
Instead of
python setup.py build wheel
twine upload dist/*
you'd just need to run
python setup.py build sdist wheel
twine upload dist/*
I also have two quick questions:
Thanks a lot for your work on making tensorboard available from pytorch, @lanpa and contributors! I am impressed with how easy it was to integrate into my pytorch code.
I am trying to run the demo.py code, but it seems no data is being sent to server.
Also, I can't see any thrown exceptions, so I am not sure where to begin debugging.
I am running pytorch3.0 and tensorboard 0.4.0rc3.
Any ideas?
Hi,
I'm using pytorch on Windows10 following the tutorial in 'https://zhuanlan.zhihu.com/p/26871672'
When i try tensorboardX out, i keep getting the following error:
TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Summary. for field Event.summary
I also tested in Ubuntu, no error occurred. So I guess it maybe caused by windows platform (or not ╮(╯▽╰)╭). Anyway, could you have a look on this issue and hopely provide a solution? After all, many guys are still bonded with Windows.
My pip freeze is listed below:
pip freeze
alabaster==0.7.9
anaconda-clean==1.0
anaconda-client==1.5.1
anaconda-navigator==1.3.1
appdirs==1.4.3
apptools==4.4.0
argcomplete==1.0.0
astroid==1.4.7
astropy==2.0.2
autopep8==1.3.2
Babel==2.3.4
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.5.1
bitarray==0.8.1
blaze==0.10.1
bleach==1.5.0
bokeh==0.12.2
boto==2.42.0
Bottleneck==1.2.1
cffi==1.10.0
chardet==3.0.2
chest==0.2.3
click==6.6
cloudpickle==0.2.1
clyent==1.2.2
colorama==0.3.7
comtypes==1.1.2
conda==4.3.25
conda-build==2.0.2
configobj==5.0.6
contextlib2==0.5.3
cryptography==1.5
cycler==0.10.0
Cython==0.24.1
cytoolz==0.8.0
dask==0.15.2
datashape==0.5.2
decorator==4.0.10
dill==0.2.5
docutils==0.12
dynd===c328ab7
envisage==4.5.1
et-xmlfile==1.0.1
fastcache==1.0.2
filelock==2.0.6
Flask==0.11.1
Flask-Cors==2.1.2
gevent==1.1.2
greenlet==0.4.10
h5py==2.7.0
HeapDict==1.0.0
html5lib==0.9999999
idna==2.1
imagesize==0.7.1
ipykernel==4.5.0
ipython==5.1.0
ipython-genutils==0.1.0
ipywidgets==5.2.2
itsdangerous==0.24
jdcal==1.2
jedi==0.9.0
Jinja2==2.8
jsonschema==2.5.1
jupyter==1.0.0
jupyter-client==4.4.0
jupyter-console==5.0.0
jupyter-core==4.2.0
lazy-object-proxy==1.2.1
llvmlite==0.20.0
locket==0.2.0
lxml==3.6.4
Markdown==2.6.9
MarkupSafe==0.23
matplotlib==2.0.2
menuinst==1.4.1
mistune==0.7.3
mpmath==0.19
multipledispatch==0.4.8
nb-anacondacloud==1.2.0
nb-conda==2.0.0
nb-conda-kernels==2.0.0
nbconvert==4.2.0
nbformat==4.1.0
nbpresent==3.0.2
networkx==1.11
nltk==3.2.1
nose==1.3.7
notebook==4.2.3
numba==0.35.0
numexpr==2.6.2
numpy==1.13.1
numpydoc==0.6.0
odo==0.5.0
opencv-python==3.3.0+contrib
openpyxl==2.3.2
packaging==16.8
pandas==0.20.3
partd==0.3.6
path.py==0.0.0
pathlib2==2.1.0
patsy==0.4.1
pep8==1.7.0
pickleshare==0.7.4
Pillow==3.3.1
pkginfo==1.3.2
ply==3.9
prompt-toolkit==1.0.3
protobuf==3.4.0
psutil==4.3.1
py==1.4.31
pyasn1==0.1.9
pycodestyle==2.3.1
pycosat==0.6.1
pycparser==2.14
pycrypto==2.6.1
pycurl==7.43.0
pyface==5.1.0
pyflakes==1.3.0
Pygments==2.1.3
pylint==1.5.4
pyOpenSSL==16.2.0
pyparsing==2.2.0
pyreadline==2.1
pytest==2.9.2
python-dateutil==2.6.0
pytz==2017.2
PyWavelets==0.5.2
pywin32==220
PyYAML==3.12
pyzmq==15.4.0
QtAwesome==0.4.4
qtconsole==4.2.1
QtPy==1.1.2
requests==2.13.0
rope-py3k==0.9.4.post1
ruamel-yaml===-VERSION
scikit-image==0.13.0
scikit-learn==0.19.0
scipy==0.19.1
seaborn==0.7.1
selenium==3.4.1
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
snowballstemmer==1.2.1
sockjs-tornado==1.0.3
Sphinx==1.3.1
spyder==3.1.4
SQLAlchemy==1.0.13
statsmodels==0.8.0
svgwrite==1.1.6
sympy==1.0
tables==3.2.2
tensorboardX==0.6.9
tensorflow==1.3.0
tensorflow-tensorboard==0.1.6
toolz==0.8.0
torch==0.2.1+a4fc05a
torchvision==0.1.9
tornado==4.4.1
traitlets==4.3.0
unicodecsv==0.14.1
update==0.4.4
wcwidth==0.1.7
Werkzeug==0.12.2
widgetsnbextension==1.2.6
win-unicode-console==0.5
wrapt==1.10.6
xgboost==0.6
xlrd==1.0.0
XlsxWriter==0.9.3
xlwings==0.10.0
xlwt==1.1.2
Hi, this is really nice project. I started to use this library because I wanted to see histograms of my trainable parameters.
Although I run demo.py
, the histograms looks strange. Is it expected behaviors?
$ python demo.py
$ tensorboard --logdir runs
Hi! I am plotting some custom stuff with pyplot during training and want to add these plots to TensorBoard as images. Since TensorBoard uses PNG, it would be really convenient to have add_image
which accepts a file (or BytesIO) as input. It would be mush easier to save a plot to memory in PNG format and skip all that tensor juggling.
I used add_image()
to record some visualization results at each step/epoch, during training the image at each step/epoch is displayed well, but after the training is done, when i draw the knob left and right, it doesn't increase or decrease incrementally by step 1, instead step numbers can just goes like 1->2->4->6->12 ..., which is annoying, my college also has the same issue. I guess it is a front-end issue, can anyone post a fix? Thanks.
For add_scalar, add_histogram, add_image, etc., they accept a tag
argument to indicate different tensors. However, add_embedding
does not have such an argument. Is it possible to add this argument so as to monitor multiple embeddings in one experiment?
In line number: https://github.com/lanpa/tensorboard-pytorch/blob/master/tensorboardX/embedding.py#L20
If a cuda tensor is passed it will throw an error as torch.randn will generate a cpu tensor and thus both won't be same type. Either throw an explicit warning or check for type of label_img
and convert rand tensor accordingly.
I solved it by converting passed tensor to cpu for now.
Hello again
I'm currently experimenting with the embeddings' visualization, and i'm having some troubles with the expected folder hierarchy. As far as I have understand, the add_embedding function does not have any timestep parameters (although there is one in the function called with value None), so it does not provide a time distributed visualization. The current hierarchy of my loggings is the following:
-project
--runs
---August14_11:24:12
----event.out
---August14_11:28:12
----event.out
i.e. every running gets his own directory with the SummaryWriter events (file event.out), and i can run everything using tensorboard from the project dir (tensorboard --logdir runs).
If I use add_embedding for one of the experiments with the following notation
add_embedding(torch.FloatTensor(out_numpy),save_path='runs/August14_11:28:12',metadata=[k.data.numpy()[0] for k in label_batch ])
I get one warning each time complaining about the fact the dir already exists, and the embedding log file get overwritten each time, so I can see only the last one written.
However if I log to a subdir with the following notation
add_embedding(torch.FloatTensor(out_numpy),save_path='runs/August14_11:28:12/emb{}'.format(unique_id),metadata=[k.data.numpy()[0] for k in label_batch ])
I can't see any embedding in the visualization's page, and i have to run tensorboard directly in the embedding log directory (e.g. tensorboard --logdir runs/August14_11:28:12/emb0), which is a bit of a pain if I log every 25 batch.
Any solutions of best practices?
Hi! my code is listed below; but the procedure does not work, it stops there all time. How can i get over it? thx!
model = dn.DenseNet3(args.layers, 10, args.growth, reduction=args.reduce,
bottleneck=args.bottleneck, dropRate=args.droprate, inputdim=args.inputdim)
res = model(torch.autograd.Variable(torch.Tensor(1, 3, 32, 32), requires_grad=False))
writer = SummaryWriter("runs/%s" % (args.name))
writer.add_graph(model, res)
writer.close()
This is probably a stupid question: I don't understand the behavior when global_step=None
. I'd expect the plot's x-axis to correspond to wallclock time, but in reality it squeezes the curve to a single dot.
Both this repo and the official TB repo say global_step
is optional. Under what situation do I actually set it to None?
Hi,
thank you for providing this library. Some problems that I came across today.
If I try to make a histogram out of the weights of some module, it is possible to explode the number of bins and consume an extremely large amount of memory. The problem due to this line https://github.com/lanpa/tensorboard-pytorch/blob/master/tensorboard/summary.py#L118. The argument bins
is never used, and as a results auto
is used in np.histogram
, which would produce bin
that is as large as 66618527586 (see attachment for an example of a bad weight matrix)
I am not sure what the preconditions for the HistogramProto are, but using the bins argument and passing it into make_histogram
would solve the problem.
Hi,
I'm a Pytorch beginner (previously working on th and tf) using your tensorboard-pytorch bridge to get some info during neural net training. It works like a charm for everything i've needed since now :). However i'm having some troubles with the graph visualization for some ConvNet and i've a few questions:
Btw great work :)
def forward(self,i):
# i stand as the input
# conv_j is a module
x = self.conv_0(i)
x = self.conv_1(x)
y = self.conv_r1(i)
z = torch.cat((y,x),1)
z = z.view(len(z),-1)
z = self.fc1(z)
z = F.relu(z)
z = self.fc2(z)
z = F.log_softmax(z)
return z
I saw the API page worked correctly a few days ago, but the API page
http://tensorboard-pytorch.readthedocs.io/en/latest/tensorboard.html
is empty now. Could you please check it again?
This code
writer = SummaryWriter(log_dir="runs/first_run")
writer.add_scalars('loss/pi', {"policy": pi_loss.data[0],
"value": V_pi_loss.data[0],
"entropy": pi_entropy.data[0]}, i_episode)
yields in tensorboard page
I guess, this is not the way the Tensorboard is supposed to recognise tags.
Also, if I add, for example, 30 different summaries (including a bunch of histograms and scalars), CPU consumption increases significantly (up to the whole available cpu time). Tensorboard becomes almost irresponsible.
I guess such a behaviour may also be due to very many tags being interpreted by tensorboard as independent runs.
tensorboard-pytorch==0.8
was installed with pip
tensorboard
is of 0.1.8 (more older versions of tensorboard are also susceptible to the same issue).
From glancing at the code, the audio
function in summary.py
seems to take a sample rate argument, so it looks like it would be trivial for the add_audio
method of SummaryWriter
to take an optional sample rate argument and pass it along to audio
. Is there some complicating factor here?
When I try to do:
from tensorboard import SummaryWriter
I get an error saying ImportError: cannot import name 'SummaryWriter'
After looking inside conda packages I found out that in the folder ~/anaconda3/lib/python3.6/site-packages/tensorboard/
there is no SummaryWriter, instead, I found it in the folder [...]/tensorboardX
. Thus, I changed to from tensorboardX import SummaryWriter
getting a new error when logging a scalar value that says TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Summary. for field Event.summary
Any ideas of why is this happening?
Thanks in advance,
Manu.
Hello again,
Since add_embedding relies on TF,
import tensorflow as tf
on line 58, I get a constant stream of tensorflow GPU logging events during training about the creation of the gpu device every time the function is called. Even if if does not compromise the functionality, it makes the output log a real mess to read.
Are you planning to strip the dependency (as have already been done with the SummaryWriter object) ?
Hello there,
I am new to tensorboard-pytorch and submitting issue on GitHub, so if you think asking question instead of filing bugs here is not a good idea, I will ask this somewhere else (please tell me where) and delete this issue.
I followed the walkthrough on this repo's README and successfully run the tensorboardX. Everything I intend to record has been saved, but there is only one issue when I run tensorboard in terminal. When I run tensorboard --logdir=logger
, 'No module named tensorflow' prompted from tensorboard/main.py. I have to activate my tensorflow environment and run the command to visualize recorded file.
I have run two commands pip install tensorboardX
and pip install tensorflow-tensorboard
successfully by the way. I used python 2.7 virtualenv to integrate everything about pytorch together.
When I'm trying to log text with tensorboard using this code
from tensorboardX import SummaryWriter
w = SummaryWriter("runs/test")
w.add_scalar("s", 1)
w.add_text("t", "text")
I get the following error:
ERROR:tensorflow:Attempting to process TensorSummary output, but no graph is present, so processing is impossible. All TensorSummary output will be ignored.
Adding scalars for example works.
In my tensorboard no "Text" menu item is displayed.
Logging scalars works fine.
The following versions are installed:
tensorboardX (0.8)
tensorflow (1.3.0)
tensorflow-tensorboard (0.1.7)
torch (0.2.0.post3)
Related to #12 , some configuration still leads to black images for the first column of the sprite. It happens with sprites completely full (i.e. the number of images is a perfect square), but only with some configurations (i.e 49 does but 100 does not). The TB implementation seems a really mess IMHO, so its not excluded it is their fault somehow.
I suggest to leave this open for other users.
Would it be possible to use numpy.isscalar(x) to condition on data type in x2num.makenp, or is there a good reason not to? It seems to me that this would simplify the code and add support for numpy.floatXX and numpy.intXX.
I'm occasionally getting an error of the following form:
[libprotobuf FATAL google/protobuf/wire_format.cc:830] CHECK failed: (output->ByteCount()) == (expected_endpoint): : Protocol message serialized to a size different from what was originally expected. Perhaps it was modified by another thread during serialization?
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: (output->ByteCount()) == (expected_endpoint): : Protocol message serialized to a size different from what was originally expected. Perhaps it was modified by another thread during serialization?
Is this some underlying tensorboard issue, or due tensorboard-pytorch?
Hi, recently Tensorboard added the ability to customize images per page (tensorflow/tensorboard@0981512). This is a very useful feature for me but I use PyTorch and hence tensorboardX.
I'd like to update tensorboardX to have this feature. I expect I'd have to build from source to do this as pip shows me as having the latest tensorboardX version (0.8). But reading through your source code, I can't find where / what I would need to change to update the underlying tensorboard web server. Any advice would be appreciated. Thanks for maintaining a great project.
Now all the x2num preprocessings are in writer.py, like:
def add_scalar(self, tag, scalar_value, global_step=None):
"""Add scalar data to summary.
Args:
tag (string): Data identifier
scalar_value (float): Value to save
global_step (int): Global step value to record
"""
scalar_value = makenp(scalar_value)
assert(scalar_value.squeeze().ndim==0), 'input of add_scalar should be 0D'
self.file_writer.add_summary(scalar(tag, scalar_value), global_step)
Why not put scalar_value = makenp(scalar_value) in scalar function.
The reason I'm proposing this, is I'm using FileWriter, and I collect the summaries during forwarding the network. (Like the pipeline in tensorflow) So I will call the scalar histogram etc functions by myself. (The reason I don't use SummaryWriter is I don't want the SummaryWriter to be exposed to the model itself.)
Now, to call scalar or histogram I have to convert to numpy first, which is ok but not necessary because you can move all the x2num to summary.py.
What do you think.
Some advantages to implement it in SummaryWriter:
runs/XXX
(currently the embedding must be written into separate directories.And in your README.txt, the add_embedding is under SummaryWriter
part.
If the original tensorboard don't have such mechanism, we can wrap the SummaryWriter
and add_embedding
into brand new unified APIs.
After I installed tensorflow 1.3 ,tensorboard can be used in terminal
But after I installed tensorboard-pytorch, it can not work:
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 7, in <module>
from tensorboard.main import main
ImportError: No module named 'tensorboard.main'
I tried to run this snippet:
import torch
import torch.nn as nn
from torch.autograd import Variable
from datetime import datetime
from tensorboard import SummaryWriter
x = Variable(torch.rand(10, 10), requires_grad=True)
model = nn.Linear(10, 10)
h = model(x)
writer = SummaryWriter('runs/'+datetime.now().strftime('%B%d %H:%M:%S'))
writer.add_graph(model, h)
writer.close()
but I get this error message:
Traceback (most recent call last):
File "/Users/Miguel/Documents/Unbabel/pytorch-tools/tests/test_tensorboard.py", line 16, in <module>
writer.add_graph(model, h)
File "/Users/Miguel/anaconda/envs/venv/lib/python2.7/site-packages/tensorboard/writer.py", line 259, in add_graph
self.file_writer.add_graph(graph(model, lastVar))
File "/Users/Miguel/anaconda/envs/venv/lib/python2.7/site-packages/tensorboard/graph.py", line 39, in graph
make_list_of_nodes(lastVar.grad_fn)
File "/Users/Miguel/anaconda/envs/venv/lib/python2.7/site-packages/tensorboard/graph.py", line 23, in make_list_of_nodes
inputs.append(make_name(next_fn))
File "/Users/Miguel/anaconda/envs/venv/lib/python2.7/site-packages/tensorboard/graph.py", line 12, in make_name
return id2name[id(obj.variable)]+'_'+str(id(obj.variable))
KeyError: 4654832816
From the readme,
for name, param in resnet18.named_parameters():
writer.add_histogram(name, param.clone().cpu().data.numpy(), n_iter)
Could we instead use the following simpler version?
for name, param in resnet18.named_parameters():
writer.add_histogram(name, param.data.cpu().numpy(), n_iter)
(Or we could put the .cpu() before the .data probably -- I don't think this matters.)
I do not use anaconda, I install tensorboard-pytorch and tensorflow py pip in the virtual enviroment.
I tried, from tensorboard import SummaryWriter
, it complains as the title. However, I find the SummaryWriter is in the writer.py in tensorboard, so I have to use from tensorboard.writer import SummaryWriter
. Where am I wrong?
The code is add_histogram(name,data, niter) as examples.
But it can not work.
The error msg is
File "/opt/pytorch/lib/python3.5/site-packages/tensorboardX/writer.py", line 305, in add_histogram
self.file_writer.add_summary(histogram(tag, values, bins), global_step)
File "/opt/pytorch/lib/python3.5/site-packages/tensorboardX/summary.py", line 113, in histogram
hist = make_histogram(values.astype(float), bins)
File "/opt/pytorch/lib/python3.5/site-packages/tensorboardX/summary.py", line 131, in make_histogram
bucket=counts)
TypeError: 0 has type numpy.int64, but expected one of: int, long, float
Hi, sorry for the non-coding question. What's the difference between this library and the other older ones like Crayon and tensorboard_logger? Crayon
looks a bit heavy-weight because it requires docker. tensorboard_logger
has not been maintained for 9 months. Other than these, are there any functional differences?
anaconda2
ubuntu 14.04
error log:
with open('HISTORY.rst') as history_file:
IOError: [Errno 2] No such file or directory: 'HISTORY.rst'
The pip repo is not updated yet. The version is 0.4
From the tensorflow docs, it seems like I should be able to organize data into nested groups. However, it looks like /
is included in the _INVALID_TAG_CHARACTERS
regex so it's stripped.
The comment mentions using name scopes, but I can't figure out what that's referring to or how to use those instead.
Hey, thanks for the great work!
It would be even better if there is an option to optionally remove a particular experiment like what we have in Crayon.
from pycrayon import CrayonClient
# Connect to the server
cc = CrayonClient(hostname="server_machine_address")
cc.remove_experiment(xp_name) # remove the 'xp_name' experiment
Thanks!
Hi,
Is it possible to upload the latest sdist to python such that there is a tar.gz and whl like in Keras? It would be nice to have a non-binary import from PyPI.
Link to keras example: https://pypi.python.org/pypi/Keras
Thanks!
Is there a way to log batches of embeddings then interact with all of the batches together in the projector?
I'm currently logging batches with the following code:
writer.add_embedding(embedding_batch, metadata=label_batch,
label_img=train_batch, global_step=current_epoch)
When I check the embeddings in the projector I have 10 (batch size * dim) tensors and I can only look at one batch at a time. they are named default:0000 - default:0010. Any way to get these all on the same graph?
One line at usage section of README does not properly work on python3.6
for name, param in resnet18.named_parameters():
writer.add_histogram(name, param, n_iter)
This code produces weird looking spike like histogram
In my case, I should specify bins
parameter to get a correct result.
for name, param in resnet18.named_parameters():
writer.add_histogram(name, param, n_iter, bins='auto')
BTW, thank you for your great work!
Hi, I meet the following error when running on Windows 10 Command Prompt and x64 Native Tools Command Prompt for VS2017. I followed the pytorch faster-rcnn to perform visualization on the trained model. https://github.com/ruotianluo/pytorch-faster-rcnn
I hope to get some information to perform visualization on Windows 10.
Thank you.
Tensorboard supports displaying of Markdown (including tables). However, passing a markdown table into tensorboard-pytorch seems to mangle the table.
Currently, the tensorboard for pytorch can not save the summarywrite state and can not load it for next run.
It would be more convenient to add the save_state and load_state method.
best
I first installed tensorboardX using
pip install tensorboardX
Received the error message
AttributeError: 'SummaryWriter' object has no attribute 'add_pr_curve'
Removed tensorboardX
pip unistall tensorboardX
Built from source
pip install git+https://github.com/lanpa/tensorboard-pytorch
Received the same error message.
Checked writer.py in my installation and found that add_pr_curve is indeed missing from SummaryWriter.
Any insight regarding this issue would be appreciated.
System:
TensorFlow 1.4.0 (CPU version)
TensorFlow-TensorBoard 0.4.0rc3
PyTorch 0.3
Anaconda Python 3.6
Linux: Ubuntu 17.10 with kernel 4.13.0
Hi,
I'm using version 0.6, and it works fine when I use writer.add_scalar
. However, using writer.add_scalars
returns the following error:
writer.add_scalars('loss',{'train_loss':loss.data[0],
AttributeError: 'SummaryWriter' object has no attribute 'add_scalars'
Is there any explanation why this fails?
When logging text after logging scalar values with the global_step
parameter set, tensorboard gives a warning (see below).
This is a MWE:
from tensorboard import SummaryWriter
writer = SummaryWriter('runs/test')
writer.add_text("T", "42")
writer.add_scalar("S", 0, 0)
writer.add_scalar("S", 0, 1)
writer.add_scalar("S", 0, 2)
writer.add_text("T", "42")
WARNING:tensorflow:Detected out of order event.step likely caused by a TensorFlow restart. Purging expired events from Tensorboard display between the previous step: 2 (timestamp: 1501673169.092804) and current step: 0 (timestamp: 1501673169.0928545). Removing 3 scalars, 0 histograms, 0 compressed histograms, 0 images, and 0 audio.
As can be seen from the warning log, this actually removes logged data.
Is this a problem just on my side or tensorboard related or from the pytorch wrapper?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.