Skip to content

Commit

Permalink
program: do not prepare_train if no training data
Browse files Browse the repository at this point in the history
  • Loading branch information
RenatoGeh committed May 14, 2024
1 parent 264bc1c commit 0f34fe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pasp/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __init__(self, net, data: Data, learnable: bool, rep: str, nvals: int, opt_p
# Derivatives of the logic program to be passed to backwards.
self.dw = None
# Initialize dw so we can use inference without learning.
self.prepare_train(0)
if self.data[0].train is not None: self.prepare_train(0)

# Temp: accuracy
# import torchvision
Expand Down

0 comments on commit 0f34fe5

Please sign in to comment.