pytorch / tnt Goto Github PK
View Code? Open in Web Editor NEWA lightweight library for PyTorch training tools and utilities
Home Page: https://pytorch.org/tnt/
License: Other
A lightweight library for PyTorch training tools and utilities
Home Page: https://pytorch.org/tnt/
License: Other
Run pip install -r requirements.txt
failed.
MultiLabelConfusionMeter is lacked in pytorch.
When it will get updated?
Thanks
It might be useful to be able to save the metrics to files, in order to be able to use them somewhere else for e.g. visualisation.
I'm thinking about something like:
mlog.save_meter(dir='train_metrics', meters={'loss':'loss.csv', 'accuracy':'accuracy.csv', 'confusion':'confusion.csv'})
For me that would be really beneficial, what do you think about it?
MeterLogger.printMeter
can't print desire information because of a logical error caused by wrong indent.
Currently it can only print the default 'loss' meter.
Below is the source of the function.
(starts from line 123 in meterlogger.py
)
def print_meter(self, mode, iepoch, ibatch=1, totalbatch=1, meterlist=None):
pstr = "%s:\t[%d][%d/%d] \t"
tval = []
tval.extend([mode, iepoch, ibatch, totalbatch])
if meterlist is None:
meterlist = self.meter.keys()
for meter in meterlist:
if meter in ['confusion', 'histogram', 'image']:
continue
if meter == 'accuracy':
pstr += "Acc@1 %.2f%% \t Acc@" + str(self.topk) + " %.2f%% \t"
tval.extend([self.meter[meter].value()[0], self.meter[meter].value()[1]])
elif meter == 'map':
pstr += "mAP %.3f \t"
tval.extend([self.meter[meter].value()])
elif meter == 'auc':
pstr += "AUC %.3f \t"
tval.extend([self.meter[meter].value()])
else:
pstr += meter + " %.3f (%.3f)\t"
tval.extend([self.meter[meter].val, self.meter[meter].mean])
pstr += " %.2fs/its\t"
tval.extend([self.timer.value()])
print(pstr % tuple(tval))
I think the error comes from commit 7b1dc6c when formatting.
https://github.com/pytorch/tnt/blob/master/torchnet/meter/apmeter.py#L36-L37 states
The probabilities should sum to one over all classes
, which is not a requirement. If multiple classes are present in an image, we would want our method to produce high confidences for each and each confidence is in the [0, 1] range. I don't think normalizing scores across classes would make much sense.
The rest of the implementation doesn't seem to be making use of this requirement.
example/mnist_with_visdom.py
will report a lot of WARNING:root:Setting up a new session...
Traceback (most recent call last):
File "/home/deepak/softwares/miniconda3/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/deepak/softwares/miniconda3/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/home/deepak/softwares/miniconda3/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
I have ported over a few more of the lua torchnet meters and would like to make a PR, but I am curious as to whether I should check inputs and convert to pytorch tensors or check inputs and convert to numpy arrays? I see more cases of the latter, but my meters are currently using pytorch tensors and resizing tensor storage in meter.add()
as many of the lua meters do.
If we start using AverageValueMeter.add
with n>1
it gives a mean of NaN
. This is because self.mean_old
is initialized to np.nan
and is not reset as we never reach the point of self.n==1
I notice sometimes snake_case, sometimes mixedCase are used for class methods
def on_end_epoch(state):
mlog.printMeter(mode="Train", iepoch=state['epoch'])
mlog.resetMeter(mode="Train", iepoch=state['epoch'])
WIll tnt codebase 100% comply with PEP8?
error message like this
>>> import torchnet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/torchnet/__init__.py", line 5, in <module>
from . import logger
File "/usr/local/lib/python3.6/site-packages/torchnet/logger/__init__.py", line 2, in <module>
from .meterlogger import MeterLogger
File "/usr/local/lib/python3.6/site-packages/torchnet/logger/meterlogger.py", line 16
self.nclass = nclass
^
TabError: inconsistent use of tabs and spaces in indentation
In my ubuntu sever, pip is ok, but torchnet is only in 'pip list' and not in 'conda list', so when i run xx.py, error is no module named 'torchnet'. So i want to ask if i can use conda to install torchnet and how to install it? could anyone help me? thanks!
Hi!
In original tnt there is IndexedDataset class.
Do you have plan to implement it? Or some other binary format is preferred?
For example see here, args are kind of unexplained:
What do you guys think about releasing a stable version of TNT? @szagoruyko @barrykui
I use TNT a lot in my own research, but custom versions that fit my projects. It might make sense to release a flexible, stable version that folks can extend. It might also make it easier for people to contribute to TNT.
Some example of what I personally might like to see is:
MeterLogger
is a great idea, and I think that we could probably factor it into a MeterStorage
class and then a VisdomMeterLogger
class and also a FileMeterLogger
class.
Is anything happening with engines? Is this a big use case for TNT users? It seems that pytorch/ignite
has similar classes, but I'm not very familiar with them.
I don't have a very strong opinion on this, but if people are not very interested in the engines
then it might be useful to drop support for them and to instead focus on I/O and metrics.
i found it would be failed when initialize MeterLogger
server with http://
head.
>>> a = MeterLogger(server="http://localhost", port=8097, env='hello')
>>> b = torch.Tensor([1])
>>> a.updateLoss(b, 'loss')
>>> a.resetMeter(mode='Train', iepoch=1)
Error message here
Exception in user code:
------------------------------------------------------------
Traceback (most recent call last):
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6cc08ce198>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/txk/.local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/txk/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //localhost:8097/events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6cc08ce198>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/txk/.local/lib/python3.6/site-packages/visdom/__init__.py", line 261, in _send
data=json.dumps(msg),
File "/home/txk/.local/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/txk/.local/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/txk/.local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/txk/.local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/txk/.local/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //localhost:8097/events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6cc08ce198>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Commit bfbe7a79a19caaabf6b93ef6488b3185cf889e1c removed Visdom.updateTrace()
This causes the visdomlogger.py to fail.
in plot(self, x, y)
51
52 def plot(self, x, y):
---> 53 self.avg_train_loss_logger.log(x, y)
54
55 def record(self, e, loss):
/usr/local/lib/python3.6/dist-packages/torchnet/logger/visdomlogger.py in log(self, *args, **kwargs)
157 # For some reason, the first point is a different trace. So for now
158 # we can just add the point again, this time on the correct curve.
--> 159 self.log(*args, **kwargs)
160
161
/usr/local/lib/python3.6/dist-packages/torchnet/logger/visdomlogger.py in log(self, *args, **kwargs)
137 type(self)))
138 x, y = args
--> 139 self.viz.updateTrace(
140 X=np.array([x]),
141 Y=np.array([y]),
AttributeError: 'Visdom' object has no attribute 'updateTrace'`
We have two base classes for datasets both in pytorch and torchnet.
This is also the case for TensorDataset
. This is potentially confusing for a new user. I had to look up the code to see if there's any relation or difference between the two versions.
My proposal for solving this is:
torch.utils.data.Dataset
as baseclass for all the datasets in tnt. This might mean foregoing of batch
, transform
etc. methods, but I think they're actually confusing anyway.tochnet.dataset.TensorDataset
to torch.utils.data.TensorDataset
and ditch tochnet.dataset.TensorDataset
Sasank.
Hi,
I tried to use BatchDataset to concatenate the outputs, tuple
with features, labels, etc., from my dataset but it seems that I should pack them inside a dictionary otherwise, this line will produce an error.
It would be cool to say that in the documentation or provide support for iterable like tuple and list.
P.D. Thanks for providing this awesome set of tools.
very odd, sometimes py3.5 bugs out on splitdataset, 3.6 is fine:
======================================================================
FAIL: testSplitDataset (__main__.TestDatasets)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_datasets.py", line 102, in testSplitDataset
self.assertEqual(splitdataset[2], 2)
AssertionError: 3 != 2
======================================================================
FAIL: testSplitDataset_fractions (__main__.TestDatasets)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_datasets.py", line 122, in testSplitDataset_fractions
self.assertEqual(splitdataset[2], 2)
AssertionError: 3 != 2
----------------------------------------------------------------------
Ran 10 tests in 0.003s
I solved this for myself by running autopep8 on my fork; not sure how best to handle.
if hasattr(torch, "arange"):
^
TabError: inconsistent use of tabs and spaces in indentation
and #50
This obviously gives an error
self.viz.updateTrace(X=np.array([x]), Y=np.array([y]), env=self.env, win=self.plots[var_name], name=split_name)
How on earth do i port this to the newer vizdom API?
For example, if I have a computer in school, it is running visdom, but the computer can't be accessed outside school, then how can I see the visdom visualization results?
Would it be better if there can be multiple hooks bound to the same event? This would prevent the need to create a meta-hook
for all hooks that need to be bound a particular event.
Also what is the relationship between this repo and the trainer class in pytorch?
visdom logger seems only support the default port 8097
tnt/torchnet/logger/visdomlogger.py
Line 21 in ba25683
Thanks!
Shouldn't the tnt.engine.Engine
be changed to tnt.engine.SGDEngine
and tnt.engine.Engine
be a generic engine?
This is similar to torchnet which allowed extending engines to make meta-engines like train_val_engine
.
Hi!
AUCMeter normally returns a tuple of (area, tpr, fpr)
. However, if no data has been added to the meter, it only returns 0.5
. It would be nice if AUCMeter would always return a tuple, i.e., that in the case of an empty meater it would return something like (0.5, [], [])
. Otherwise one always has to check if the return value is a tuple or not.
I suggest adding an option to use the logger to save to JSON files.
this is comment in origin code in module VisdomPlotLogger
Thanks for creating the module. However, it seems that we cannot install it in conda environment. Will it be supported later? Thank you.
Hi, all:
I encounter the blew error when running meter_map.add(output.data,target.cuda(async=True))
AttributeError: 'torch.cuda.LongTensor' object has no attribute 'pow'
pytorch version: 0.2
Does this version not implement the pow
function in cuda mode?
Thanks.
It says here:
It does not support multi-label, multi-class problems: for such problems, please use MultiLabelConfusionMeter.
Actually, there is no MultiLabelConfusionMeter class implemented in pytorch yet.
Hi,
Thanks!
The script to reproduce the bug:
from torch import nn
from torch.autograd import Variable
from torch.optim import Adam
from torchnet.engine import Engine
from tqdm import tqdm
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
from torchvision.datasets import MNIST
class MNISTNet(nn.Module):
def __init__(self):
super(MNISTNet, self).__init__()
self.features = nn.Sequential(
nn.Conv2d(in_channels=1, out_channels=64, kernel_size=7, stride=2, padding=3),
nn.Conv2d(in_channels=64, out_channels=128, kernel_size=3, stride=2, padding=1),
nn.Conv2d(in_channels=128, out_channels=256, kernel_size=3, stride=2, padding=1),
nn.Conv2d(in_channels=256, out_channels=512, kernel_size=3, stride=2, padding=1),
nn.Conv2d(in_channels=512, out_channels=512, kernel_size=3, stride=1, padding=1)
)
self.classifier = nn.Linear(in_features=2 * 2 * 512, out_features=10)
def forward(self, x):
out = self.features(x)
out = out.view(out.size(0), -1)
classes = self.classifier(out)
return classes
def get_iterator(mode):
data = MNIST(root='./', train=mode, transform=transforms.ToTensor(), download=True)
return DataLoader(dataset=data, batch_size=64, shuffle=mode, num_workers=4)
def processor(sample):
data, labels, training = sample
data = Variable(data).cuda()
labels = Variable(labels).cuda()
classes = model(data)
loss = loss_criterion(classes, labels)
return loss, classes
def on_sample(state):
state['sample'].append(state['train'])
def on_start_epoch(state):
state['iterator'] = tqdm(state['iterator'])
def on_end_epoch(state):
engine.test(processor, get_iterator(False))
if __name__ == '__main__':
model = MNISTNet().cuda()
loss_criterion = nn.CrossEntropyLoss().cuda()
optimizer = Adam(model.parameters())
engine = Engine()
engine.hooks['on_sample'] = on_sample
engine.hooks['on_start_epoch'] = on_start_epoch
engine.hooks['on_end_epoch'] = on_end_epoch
engine.train(processor, get_iterator(True), maxepoch=100, optimizer=optimizer)
Error messages
Hi, @ezyang @zdevito @colesbury @Alexandersax @joeyhng
How can I use aucmeter in my pytorch?
I'm using a binary classification with pytorch cnn.
Thanks in advance.
At the moment it is not possible to configure the Visdom client with a username & password. Making it impossible to use this repo when you have a visdom server with auth enabled.
I'll gladly submit a PR with this feature if you think this is something you would accept.
The implementation would be passing username
and password
from the logger classes until it gets to visdom.Visdom
, like:
self._viz = visdom.Visdom(
server="http://" + server,
port=port,
username=user,
password=pass
)
Based on this thread it seems as if the internal members of the class hold references to the tensors
, thus yielding wrong results.
When the tensor
value is passed by .item()
the result is correct.
A simple fix would be to add this condition to add
:
def add(self, value, n=1):
if isinstance(value, torch.Tensor):
value = value.item()
self.val = value
I can submit a PR, if that makes sense to you.
On running pip install torchnet in python2.7 environment I get
Collecting torchnet
Could not find a version that satisfies the requirement torchnet (from versions: )
No matching distribution found for torchnet
Pytorch is installed in the environment.
Need to fix these:
..........
----------------------------------------------------------------------
Ran 10 tests in 0.015s
OK
E.../Users/szagoruyko/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:135: RuntimeWarning: Degrees of freedom <= 0 for slice
keepdims=keepdims)
/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:127: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
.....E
======================================================================
ERROR: testAPMeter (__main__.TestMeters)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_meters.py", line 208, in testAPMeter
ap = mtr.value()
File "/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/torchnet/meter/apmeter.py", line 137, in value
ap[k] = precision[truth.byte()].sum() / max(truth.sum(), 1)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.LongTensor for argument #2 'other'
======================================================================
ERROR: testmAPMeter (__main__.TestMeters)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_meters.py", line 329, in testmAPMeter
ap = mtr.value()
File "/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/torchnet/meter/mapmeter.py", line 30, in value
return self.apmeter.value().mean()
File "/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/torchnet/meter/apmeter.py", line 137, in value
ap[k] = precision[truth.byte()].sum() / max(truth.sum(), 1)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.LongTensor for argument #2 'other'
----------------------------------------------------------------------
Ran 10 tests in 0.118s
FAILED (errors=2)
I introducted TNT into my pure-PyTorch Project, but right now I'm getting the following warnings while training
...
'>' not supported between instances of 'float' and 'NoneType'
...
It does not seem to have any effect on my meters though.
The lines I'm using from TNT are:
mlog = MeterLogger(server='127.0.0.1', port=8097, nclass=2, title="Part-Logger")
...
mlog.update_loss(loss.cpu(), meter='loss')
mlog.update_meter(outputs[0].cpu(), labels.cpu(), meters={'accuracy', 'confusion'})
...
mlog.print_meter(mode="Train", iepoch=epoch)
mlog.reset_meter(mode="Train", iepoch=epoch)
Where the parameters might look like this:
> loss.cpu()
[1], dtype=float32
> outputs[0].cpu().shape
[20, 2], dtype=float32
> labels.cpu().shape
[20], dtype=int32
Hello.
There is some strange behavior in AverageValueMeter
. Both of tests below are failing with big difference in values:
import numpy as np
from torchnet.meter import AverageValueMeter
def test_tnt_meter_mean():
values = np.random.rand(1000)
meter = AverageValueMeter()
meter.add(values[0])
for i in range(1, len(values)):
meter.add(values[i])
met_mean = meter.value()[0]
print(i)
assert met_mean == values[:i+1].mean()
def test_tnt_meter_std():
values = np.random.rand(1000)
meter = AverageValueMeter()
meter.add(values[0])
for i in range(1, len(values)):
meter.add(values[i])
met_std = meter.value()[1]
print(i)
assert met_std == values[:i+1].std()
I understand that this may be intentional, but it's not documented and not what is usually expected by default from class with Average
in it's name.
this was caused by error indent in #85
The implementation of the standard-deviation calculation in torchnet.meter.AverageValueMeter is numerically unstable and can lead to a negative value of the variance (line 23: (self.var - n * mean * mean) / (n - 1.0)). This negative value triggers a "ValueError: math domain error" exception when we try to take the square-root of it.
The reason is explained well by John D. Cook in his blog post: https://www.johndcook.com/blog/standard_deviation/
Specifically, Mr. Cook says: “If the x‘s are large and the differences between them small, direct evaluation of the equation above would require computing a small number as the difference of two large numbers, a red flag for numerical computing. The loss of precision can be so bad that the expression above evaluates to a negative number even though variance is always positive.”
I’ve created a test case (attached) showing an example where the calculation of the standard deviation triggers an exception when a negative variance is used to calculate the standard deviation.
I’ve also created a fix, based on John D. Cook’s implementation of B.P. Welford’s variance computation algorithm, which is attached. The credit goes entirely to Mr. Cook, as I used his implementation. I even preserved his variable naming, although I made one small change: instead of using m_oldS and m_newS, I used one variable (m_S) because there is no need for two variables.
test.py.txt
I'm using Python 2.7.12, Pytorch 0.2.0_3
Thanks!
Neta
Apparently, the repo wiki only lists how to install torchnet, however, there's no way documented on how to incorporate updates that have been done in the main repository. It would be convenient if you could add how to especially for people who use torchnet for their work but haven't had a lot of experience with version control or git.
When using tnt's meterlogger a deprecation warning by PyTorch does appear:
UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.
5. Use tensor.item() to convert a 0-dim tensor to a Python number
Issued by this line.
Replacing loss[0]
with loss.item()
should fix that without any further consequences
here is a sample code to reproduce:
y_pred = np.array([[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0],
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0],
[1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0],
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]])
y_true = np.array([[0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0],
[1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],
[1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0],
[0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]])
y_pred = y_pred.reshape([-1])
y_true = y_true.reshape([-1])
aucmeter = AUCMeter()
aucmeter.add(y_pred, y_true)
print(aucmeter.value()[0], sklearn.metrics.roc_auc_score(y_true,y_pred))
the data sample is not the best to measure an AUC for a ROC but is should reproduce the same result
File "/Volumes/ShareData/Projects/gantoolbox/gantoolbox/engines/logging.py", line 38, in write_to_logs
logger.log(state['g_iters'], value)
File "/Volumes/home500/anaconda/envs/pytorch/lib/python3.5/site-packages/torchnet/logger/visdomlogger.py", line 105, in log
self.viz_logger(*args, **kwargs)
File "/Volumes/home500/anaconda/envs/pytorch/lib/python3.5/site-packages/torchnet/logger/visdomlogger.py", line 47, in _viz_logger
**kwargs)
File "/Volumes/home500/anaconda/envs/pytorch/lib/python3.5/site-packages/visdom/__init__.py", line 190, in result
return fn(*args, **kwargs)
TypeError: histogram() got multiple values for argument 'win'
value
is confirmed to be a 1-D FloatTensor on CPU.
The logger is created with:
tnt.logger.VisdomLogger('histogram', opts=dict(
title=title,
numbins=100
))
(Also I note there's a bug in the histogram example in visdomlogger.py
, an extra ,
when the logger is created.)
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.