Skip to content

Commit

Permalink
Polish random generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
zjowowen committed Jul 19, 2024
1 parent f6cbd0d commit eaea86c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grl/generative_models/random_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ def generate_data_from_dict(
)
else:
try:
return list(data_size)
return lambda batch_size=None: generate_batch_tensor(
list(data_size), device, batch_size
)
except:
raise ValueError(f"Invalid data size: {data_size}")

Expand Down

0 comments on commit eaea86c

Please sign in to comment.