From 058bed9f9e55107c6d0fa405c37f352184ba1e2a Mon Sep 17 00:00:00 2001 From: Tzu-Wei Huang Date: Tue, 25 Jul 2017 20:09:39 +0800 Subject: [PATCH] update readme --- HISTORY.rst | 5 ++++- README.md | 29 ++++++++++++++++++++++------- setup.py | 2 +- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 36038b32..18b4e47d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,5 +1,9 @@ History ======= +0.6 (2017-07-18) +----------------- +* supports embedding + 0.5 (2017-07-18) ----------------- * supports graph summary @@ -21,7 +25,6 @@ History 0.1 (2017-06-13) ------------------ - * First commit. Reference: https://github.com/TeamHG-Memex/tensorboard_logger https://github.com/dmlc/tensorboard diff --git a/README.md b/README.md index 7018d1f9..9867d6ca 100644 --- a/README.md +++ b/README.md @@ -76,26 +76,42 @@ as you wish. * `log_dir` (*str*) - the location of the log folder. > `add_scalar(str tag, float value, int global_step=None)` -> ###### parameter: +>> ###### parameter: > * `value` (*float*) - the value to keep. > `add_image(str tag, torch.Tensor t, int global_step=None)` -> ###### parameter: +>> ###### parameter: > * `t` (*torch.Tensor*) - torch tensor of size (3,H,W). I suggest use `torchvision.utils.make_grid()` to prepare it. > `add_audio(str tag, torch.Tensor t, int global_step=None)` -> ###### parameter: +>> ###### parameter: > * `t` (*torch.Tensor*) - one dimensional torch tensor. The value should between [-1, 1]. The sample rate is currently fixed at 44100 KHz. >`add_histogram(str tag, numpy.ndarray values, int global_step=None, bins='tensorflow')` -> ###### parameter: +>> ###### parameter: > * `values` (*numpy.ndarray*) - one dimensional numpy array. > * `bins` (*str*) - one of {'tensorflow', [numpy_arguments](https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html)}, determines how the bins are made. >`add_text(str tag, str text_to_save, int global_step=None)` -> ###### parameter: +>> ###### parameter: > * `text_to_save ` (*str*) - the string to keep. +>`add_graph(torch.nn.Module model, torch.autograd.Variable lastnode)` +>> ###### parameter: +> * `model ` (*torch.nn.Module*) - the model to draw. +> * `lastnode ` (*torch.autograd.Variable*) - the output variable of the model. + +>> see `demo_graph.py` + +>`add_embedding(torch.Tensor t, str save_path, list metadata=None, torch.Tensor label_img=None)` +>> ###### parameter: +> * `t ` (*torch.Tensor*) - A two dimensional tensor. Each row corresponds to one feature vector. +> * `save_path` (*str*) - save path +> * `metadata` (*list*) - a list of label composed of number or string. `len(metadata)` should equal the number of rows of `t` +> * `label_img` (*torch.Tensor*) - 4-D tensor (NCHW). `label_img.size(0)` should equal the number of rows of `t` + +>> see `demo_embedding.py` + > ### Common parameters: > * `tag` (*str*) - values with same tag group together. > * `global_step` (*int*) - logs the training step on which the value is saved. @@ -103,8 +119,7 @@ as you wish. ## TODO audio sample rate -histogram binning method -embedding + ## reference: diff --git a/setup.py b/setup.py index 0a4377f9..c157afc6 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ setup( name='tensorboard-pytorch', - version='0.5', + version='0.6', description='Log TensorBoard events with pytorch', long_description= history, author='Tzu-Wei Huang',