How to show several runs in Tensorboard? - tensorflow

I want to show several runs in tensorboard, but tensorboard starts and don't show any run. What is the problem?
My folder structure is like the following:
Trainingfolder
annotations
exported-models
images
models
cv300_v4_l2_higher
cv300_v4_l2_lower
pre-trained-models
Now, I want to start tensorboard to compare the two runs cv300_v4_l2_higher and cv300_v4_l2_lower.
I tried to start tensorboard with several commands in my Trainingfolder, but they don't show me my two runs:
tensorboard --logdir=models
tensorboard --logdir models
tensorboard --logdir=run1:models/cv300_v4_l2_higher,run2:models/cv300_v4_l2_higher
I hope you can help to solve the problem, why the runs aren't show in the tensorboard.
Thank you.

Related

Same code running matplotlib thru anaconda prompt and spyder give images of different clarity

I'm trying to run a deep learning code. I usually run in spyder win10. The images obtained thru matplotlib are saved using something like:
plt.savefig('./output/'+filename+'_'+str(num)+'.png',dpi=360)
Occasionally, I would run the code thru the anaconda prompt using:
python abc.py
In this case, the image would appear on-screen. I realise that if I enlarge them, I can get a much clearer image with more details, as compared to the saved image. Why is this so? I have attached some images for comparison

Change the step number of displayed images on Pytorch Tensorboard

I am running tensorboard on a pytorch lightning_logs folder containing some results. However, in the images tab, the batch of images produced are always at step=0 (see attached screenshot). How do I view images produced at a later step on tensorboard? I tried to modify the global_step variable in the image functions in env/lib/python3.7/site-packages/torch/utils/tensorboard/writer.py but this doesn't do anything. I have also attached the command I have run and the contents of the lightning_log folder, as I am unsure if the writer.py file I previously mentioned is the one being accessed.
Command: tensorboard --logdir experiments/lightning_logs/version_8744369/
Contents of lightning_logs/version_8744369/: events.out.tfevents.1594223100.gl1019.arc-ts.umich.edu.150337.0,
events.out.tfevents.1594223139.gl1019.arc-ts.umich.edu.150338.0,
hparams.yaml
tensorboard output screenshot

What is Colab uploading (repeatedly/persistently), and why?

I am running a python-tensorflow-keras jupyter notebook on Colab, training a CNN on Caltech-256 images. The data is loaded from the Caltech site directly to the Colab area with a wget, and never appears on my PC. The notebook includes Tensorboard, and some Callbacks. Obviously, as I first upload the notebook to Colab, that will use some internet bandwidth. I would expect that the rest of the time there should be very little traffic - only enough to update my screen at the end of each epoch (every 600 seconds) or as I click on it. However, there is actually quite a lot of traffic - enough to impact the other people in my house significantly. I believe that the problem is with our upload speed (ie data going from my PC to Colab). I am using Firefox web browser. When I switch to Colab Playground mode, the issue disappears.
What is being uploaded, and why?
Is there any workaround?
I've found the answer here https://github.com/tensorflow/tensorboard/issues/3196
I don't totally understand it, but the workaround listed there works for me:
While the notebook is running, in the tensorboard display, click the settings cog (top right), and uncheck the auto-update box. (You then need to click the refresh icon whenever you want to update your graphs.)
This has to be repeated every time you open the notebook, but it's a small price to pay for family harmony.

How do I change the line color of the tensorboard?

After two training, I recorded the errors on the tensorboard.
The picture below is that.
Both lines are orange and difficult to distinguish.
The smaller of the two lines is the first experiment, the larger the error is the second experiment.
How can I set the line color differently each time I learn?
And if you look at the picture above, how do you get rid of a straight line?
Finally, if you look at the picture, there is a faint afterimage. I want to get rid of this.
Thanks you.
You have to write the results of each experiment to a different subdirectory, using a different writer. TensorBoard will present the logs from each subdirectory with different colors and with their names on the left.
The straight lines are for the same reason, TensorBoard thinks it's all a single experiment, so it jumps from step 60k to step 0 (because logs were written in that order).

How to change colors of function plots in Tensorboard?

I'm trying to compare different learning-rate-decays using Tensorflow. Therefore I visualize the cost functions in Tensorboard ('EVENTS'-tab). My problem is that the different plots of the functions are in very similar colors making it hard to compare them. Is there any possibility to change those colors?
Just create different summary writes with different log files for each learning rate. Then launch the tensorboard tool using:
tensorboard --logdir=tag1:/path/to/summary/one,tag2:/path/to/summary/two
There's currently no way to change those colors, but a recent release has made the colors more differentiated. Try updating and seeing if that helps.
This is very far from an actual solution, but in case someone only wants to change the colors for a screenshot in a paper or presentation its a quick workaround:
Open your browser dev tools (F12)
Search for the color code you want to change (the default orange is #ff7043) and replace it with the color you want
As suggested here, creating (and pointing tensorboard to) a symlink of a run's logdir is one workaround to change the color used to plot that run.