Lightining update (#104)

* multiple functions for version 0.0
* lightining update
* minor changes
* data pinn  loss added
---------

Co-authored-by: Nicola Demo <demo.nicola@gmail.com>
Co-authored-by: Dario Coscia <dariocoscia@cli-10-110-3-125.WIFIeduroamSTUD.units.it>
Co-authored-by: Dario Coscia <dariocoscia@Dario-Coscia.station>
Co-authored-by: Dario Coscia <dariocoscia@Dario-Coscia.local>
Co-authored-by: Dario Coscia <dariocoscia@192.168.1.38>
This commit is contained in:
Dario Coscia
2023-06-07 15:34:43 +02:00
committed by Nicola Demo
parent 0e3625de80
commit 63fd068988
16 changed files with 710 additions and 603 deletions

View File

@@ -88,6 +88,8 @@ class LabelTensor(torch.Tensor):
self._labels = labels # assign the label
# TODO remove try/ except thing IMPORTANT
# make the label None of default
def clone(self, *args, **kwargs):
"""
Clone the LabelTensor. For more details, see
@@ -96,7 +98,12 @@ class LabelTensor(torch.Tensor):
:return: a copy of the tensor
:rtype: LabelTensor
"""
return LabelTensor(super().clone(*args, **kwargs), self.labels)
try:
out = LabelTensor(super().clone(*args, **kwargs), self.labels)
except:
out = super().clone(*args, **kwargs)
return out
def to(self, *args, **kwargs):
"""