fix: training loss is a zero dimensional tensor

Should fix the problem with EarlyStopping callback.
This commit is contained in:
Alexander Engelsberger
2021-06-25 16:56:10 +02:00
committed by Alexander Engelsberger
parent f56ec44afe
commit 7b9b767113
7 changed files with 10 additions and 13 deletions

View File

@@ -1,12 +1,11 @@
"""GMLVQ example using the MNIST dataset."""
import torch
from pytorch_lightning.utilities.cli import LightningCLI
import prototorch as pt
import torch
from prototorch.models import ImageGMLVQ
from prototorch.models.abstract import PrototypeModel
from prototorch.models.data import MNISTDataModule
from pytorch_lightning.utilities.cli import LightningCLI
class ExperimentClass(ImageGMLVQ):

View File

@@ -2,12 +2,11 @@
import argparse
import prototorch as pt
import pytorch_lightning as pl
import torch
from sklearn.datasets import load_iris
import prototorch as pt
if __name__ == "__main__":
# Command-line arguments
parser = argparse.ArgumentParser()