Skip to content

Commit

Permalink
Updated documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharif1093 committed Mar 5, 2019
1 parent f27d74e commit 02998da
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions digideep/utility/visdom_engine/Wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" https://github.com/pytorch/tnt
""" This module is highly inspired by: https://github.com/pytorch/tnt
BSD 3-Clause License
Copyright (c) 2017- Sergey Zagoruyko,
Expand Down Expand Up @@ -40,17 +41,17 @@
class VisdomWrapper(object):
"""
This class does not need to be serializable.
Can be given among the `kwargs` params:
* 'opts'
* 'env'
If you want to be consistent between different runs,
you must use assign 'win' as input.
Args:
command: The visdom command.
win: The window name.
kwargs: The dictionary of keyword arguments. May include ``opts`` and ``env``.
Note:
If you want to be consistent between different runs, you must assign 'win' as input.
For example:
v = VisdomWrapper('line', win='TestLoss', opts={'title':'TestLoss'}, X=np.array([1]), Y=np.array([4]))
Example:
>>> v = VisdomWrapper('line', win='TestLoss', opts={'title':'TestLoss'}, X=np.array([1]), Y=np.array([4]))
"""
def __init__(self, command, win, **kwargs):
self.viz = VisdomInstance.getVisdomInstance()
Expand Down Expand Up @@ -79,7 +80,7 @@ def get_env(self):

class VisdomWrapperPlot(VisdomWrapper):
"""
In the append function, user should provide X=np.array(...), Y=np.array(...)
In the append function, user should provide ``X=np.array(...), Y=np.array(...)``
"""
def __init__(self, plot_type, win, **kwargs):
super(VisdomWrapperPlot, self).__init__(plot_type, win=win, **kwargs)
Expand Down

0 comments on commit 02998da

Please sign in to comment.