Skip to content

Commit

Permalink
unify naming: tensorboard-pytorch -> tensorboardX
Browse files Browse the repository at this point in the history
  • Loading branch information
lanpa committed Aug 4, 2018
1 parent b64272a commit cf69699
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 21 deletions.
3 changes: 0 additions & 3 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ History
* Multiple Embeddings in One Experiment
* Supports Chainer and mxnet

* fixed incorrect image<->label pairing in embedding function (#12)
* unifies API call and adds docstring. Documentation is available at: http://tensorboard-pytorch.readthedocs.io/

0.7 (2017-08-22)
-----------------
* remove tensorflow dependency for embedding function
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# tensorboardX

[![Build Status](https://travis-ci.org/lanpa/tensorboard-pytorch.svg?branch=master)](https://travis-ci.org/lanpa/tensorboard-pytorch)
[![Build Status](https://travis-ci.org/lanpa/tensorboardX.svg?branch=master)](https://travis-ci.org/lanpa/tensorboardX)
[![PyPI version](https://badge.fury.io/py/tensorboardX.svg)](https://badge.fury.io/py/tensorboardX)
[![Downloads](https://img.shields.io/badge/pip--downloads-5K+-brightgreen.svg)](https://bigquery.cloud.google.com/savedquery/966219917372:edb59a0d70c54eb687ab2a9417a778ee)
[![Documentation Status](https://readthedocs.org/projects/tensorboard-pytorch/badge/?version=latest)](https://tensorboard-pytorch.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/tensorboardX/badge/?version=latest)](https://tensorboardX.readthedocs.io/en/latest/?badge=latest)

Write TensorBoard events with simple function call.

Expand All @@ -15,7 +15,7 @@ Write TensorBoard events with simple function call.

* requirement for `demo_graph.py` is tensorboardX>=1.2 and pytorch>=0.4

* [FAQ](https://github.com/lanpa/tensorboard-pytorch/wiki)
* [FAQ](https://github.com/lanpa/tensorboardX/wiki)

## Install

Expand All @@ -25,7 +25,7 @@ Tested on anaconda2 / anaconda3, with PyTorch 0.4 / torchvision 0.2 / tensorboar

or build from source:

`pip install git+https://github.com/lanpa/tensorboard-pytorch`
`pip install git+https://github.com/lanpa/tensorboardX`


## Example
Expand Down Expand Up @@ -97,9 +97,7 @@ writer.close()

## Tweaks

To add more ticks for the slider (show more image history), you can modify the hardcoded `event_accumulator` in `~/anaconda3/lib/python3.6/site-packages/tensorflow/tensorboard/backend/application.py` as you wish.

For `tensorflow-tensorboard` > 0.17 see https://github.com/lanpa/tensorboard-pytorch/issues/44
To add more ticks for the slider (show more image history), check https://github.com/lanpa/tensorboardX/issues/44

## Reference

Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = tensorboard-pytorch
SPHINXPROJ = tensorboardX
SOURCEDIR = .
BUILDDIR = _build

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# tensorboard-pytorch documentation build configuration file, created by
# tensorboardX documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 9 01:38:01 2017.
#
# This file is execfile()d with the current directory set to its
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ that have correct size for ``m``. Let ``r = m(t)``, then please invoke
require gradient, therefore it will be omitted when back tracing. To draw the
input node, pass an additional parameter ``requires_grad=True`` when creating the
input tensor. See
`The graph demo <https://github.com/lanpa/tensorboard-pytorch/blob/master/demo_graph.py>`_ for
`The graph demo <https://github.com/lanpa/tensorboardX/blob/master/demo_graph.py>`_ for
complete example.


Expand Down Expand Up @@ -147,7 +147,7 @@ distant points have very different label (semantically or visually). Here the
metadata is a list of labels, and the length of the list should equal to n, the
number of the points. The label_imgs is a 4D tensor of size ``NCHW``. ``N`` should equal
to ``n`` as well. See
`The embedding demo <https://github.com/lanpa/tensorboard-pytorch/blob/master/demo_embedding.py>`_ for
`The embedding demo <https://github.com/lanpa/tensorboardX/blob/master/demo_embedding.py>`_ for
complete example.


Expand All @@ -156,9 +156,9 @@ useful commands
install
=======

Simply type ``pip install tensorboard-pytorch`` in Bash to install this package.
Simply type ``pip install tensorboardX`` in Bash to install this package.
To use the newest version, you might need to build from source or ``pip install
tensorboard-pytorch —-no-cache-dir`` . To run tensorboard web server, you need
tensorboardX —-no-cache-dir`` . To run tensorboard web server, you need
to install tensorflow by ``pip install tensorflow`` or ``pip install tensorflow-gpu``.
After that, type ``tensorboard --logdir=<yourlogdir>`` to start the server, where
``yourlogdir`` is the parameter of the object constructor. I think this command is
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial_zh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Google TensorFlow 附加的工具 Tensorboard 是一個很好用的視覺化工
安裝
-------
在命令列輸入pip install tensorboardX即可
或是最新版源碼安裝pip install git+https://github.com/lanpa/tensorboard-pytorch
或是最新版源碼安裝pip install git+https://github.com/lanpa/tensorboardX

使用
-------
Expand Down Expand Up @@ -75,7 +75,7 @@ forward propagate 一次 m(x) 或是多個輸入時:m((x, y, z))

高維度資料視覺化/降維 (embedding)
---------------------------------------------------
因為人類對物體的了解程度只有三維,所以當資料的維度超過三的時候我們沒辦法將他視覺化。這時候就需要降維來讓資料的維度小於等於三。降維運算由 tensorboard 以 Javascript 執行,演算法有 PCA 及 t-sne 兩種可選。這邊我們只需要負責提供每個點的高維度特徵即可。提供的格式是一個矩陣,一個 n x d 的矩陣 n 點的數量, d 是維度的多寡。 高維度特徵可以是原始資料。比如說影像,或是網路學到的壓縮結果。這原始資料決定了資料的分佈情形。如果要看得更清楚一點,你可以再傳 metadata / label_imgs 的參數進去(metadata是一個 python list 長度為 n, label_imgs 是一個 4 維矩陣,大小是 nCHW。這樣每個點就會有他對應的文字或圖在旁邊。不懂的話就看範例吧:https://github.com/lanpa/tensorboard-pytorch/blob/master/demo_embedding.py
因為人類對物體的了解程度只有三維,所以當資料的維度超過三的時候我們沒辦法將他視覺化。這時候就需要降維來讓資料的維度小於等於三。降維運算由 tensorboard 以 Javascript 執行,演算法有 PCA 及 t-sne 兩種可選。這邊我們只需要負責提供每個點的高維度特徵即可。提供的格式是一個矩陣,一個 n x d 的矩陣 n 點的數量, d 是維度的多寡。 高維度特徵可以是原始資料。比如說影像,或是網路學到的壓縮結果。這原始資料決定了資料的分佈情形。如果要看得更清楚一點,你可以再傳 metadata / label_imgs 的參數進去(metadata是一個 python list 長度為 n, label_imgs 是一個 4 維矩陣,大小是 nCHW。這樣每個點就會有他對應的文字或圖在旁邊。不懂的話就看範例吧:https://github.com/lanpa/tensorboardX/blob/master/demo_embedding.py

紀錄短片
---------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
long_description= history,
author='Tzu-Wei Huang',
author_email='[email protected]',
url='https://github.com/lanpa/tensorboard-pytorch',
url='https://github.com/lanpa/tensorboardX',
packages=find_packages(exclude=['docs', 'tests']),
include_package_data=True,
install_requires=requirements,
Expand Down
4 changes: 2 additions & 2 deletions tensorboardX/visdom_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ def add_video(self, tag, vid_tensor, global_step=None, fps=4):
global_step (int): Global step value to record
fps (float or int): Frames per second
Shape:
vid_tensor: :math:`(B, C, T, H, W)`. (if following tensorboard-pytorch format)
vid_tensor: :math:`(B, C, T, H, W)`. (if following tensorboardX format)
vid_tensor: :math:`(T, H, W, C)`. (if following visdom format)
B = batches, C = colors (1, 3, or 4), T = time frames, H = height, W = width
"""
shape = vid_tensor.shape
# A batch of videos (tensorboard-pytorch format) is a 5D tensor
# A batch of videos (tensorboardX format) is a 5D tensor
if len(shape) > 4:
for i in range(shape[0]):
# Reshape each video to Visdom's (T x H x W x C) and write each video
Expand Down

0 comments on commit cf69699

Please sign in to comment.