Skip to content

Commit

Permalink
Merge branch 'rvankoert:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rvankoert authored Apr 17, 2024
2 parents a1edf05 + adda529 commit a8947ec
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/api/image_preparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,6 @@ def handle_model_change(prepared_queue: multiprocessing.Queue,
batch_identifiers, batch_metadata, old_channels,
prepared_queue, request_queue)

# Clearing the current batch
batch_images.clear()
batch_groups.clear()
batch_identifiers.clear()
batch_metadata.clear()

# Update the model channels
num_channels = update_channels(new_model)

Expand Down Expand Up @@ -470,7 +464,7 @@ def pad_and_queue_batch(model_path: str,
tf.constant(-10, dtype=tf.float32)))

# Convert the dataset to a padded batch
padded_batch = next(iter(dataset))
padded_batch = tf.data.Dataset.get_single_element(dataset).numpy()

# Push the prepared batch to the prepared_queue
prepared_queue.put((padded_batch, batch_groups, batch_identifiers,
Expand Down

0 comments on commit a8947ec

Please sign in to comment.