Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions tmu/clause_bank/clause_bank_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ def prepare_X_autoencoder(self, X_csr, X_csc, active_output):
X_gpu = self._profiler.profile(cuda.mem_alloc, X.nbytes)
return (
active_output_gpu,
active_output,
int(active_output.shape[0]),
X_csr_indptr_gpu,
X_csr_indices_gpu,
Expand All @@ -473,8 +472,8 @@ def prepare_X_autoencoder(self, X_csr, X_csc, active_output):
X_gpu
)

def produce_autoencoder_example(self, encoded_X, target, accumulation):
target_value = self.rng_gen.choice(2)
def produce_autoencoder_example(self, encoded_X, target, target_true_p, accumulation):
target_value = int(self.coordinator.host.rng.random() <= target_true_p)
self._ensure_context()
try:
self.produce_autoencoder_examples_gpu.prepared_call(
Expand Down Expand Up @@ -619,9 +618,9 @@ def prepare_X_autoencoder(self, X_csr, X_csc, active_output):
else:
return None

def produce_autoencoder_example(self, encoded_X, target, accumulation):
def produce_autoencoder_example(self, encoded_X, target, target_true_p, accumulation):
if self.device:
return self.device.produce_autoencoder_example(encoded_X, target, accumulation)
return self.device.produce_autoencoder_example(encoded_X, target, target_true_p, accumulation)
else:
return None

Expand Down