Skip to content

Commit

Permalink
(MA) added assertions that data to operate on is available before tu…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
amkrajewski committed Mar 28, 2024
1 parent a8fd4cd commit df8c77c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pysipfenn/core/modelAdjusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ def adjust(

if verbose:
print("Loading the data...")
assert len(self.descriptorData) != 0, "The descriptor data must not be empty for the adjustment process."
assert len(self.targetData) != 0, "The target data must not be empty for the adjustment process."
assert len(self.descriptorData) == len(self.targetData), "The descriptor and target data must have the same length."

ddTensor = torch.from_numpy(self.descriptorData).float().to(device=self.device)
tdTensor = torch.from_numpy(self.targetData).float().to(device=self.device)
if validation > 0:
Expand Down

0 comments on commit df8c77c

Please sign in to comment.