Hi Anton!



 Harardin:

I get negative loss numbers returned.


You are probably passing target values that are greater than one into
your MultiLabelSoftMarginLoss loss criterion.


criterion = nn.MultiLabelSoftMarginLoss()
...
for epoch in range(num_epochs):
    for i, (open_close, min_max) in enumerate(train_loader):
        outputs = model(open_close)
        ...
        loss = criterion(outputs, min_max)



min_max is read in from some unspecified data file, and then used as
the target for MultiLabelSoftMarginLoss, which expects its target
to consist of values that are either 0.0 or 1.0.  If you pass it values
that are greater than 1.0, it can return a negative loss.
Best.
K. Frank