Skip to content

Commit 2e4e716

Browse files
Change output signature dtype from float32 to int32
Fix dtype on generator Dataset.
1 parent 9e443f3 commit 2e4e716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generative-proof-of-concept-CPU-preprocessing-in-memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ def create_dataset(raw_text_samples, tokenizer, sample_expansion_batch_size=10)
13901390
dataset = tf.data.Dataset.from_generator(
13911391
lambda: generator,
13921392
output_signature=(
1393-
tf.TensorSpec(shape=(MAX_SEQ_LENGTH,), dtype=tf.float32),
1393+
tf.TensorSpec(shape=(MAX_SEQ_LENGTH,), dtype=tf.int32),
13941394
tf.TensorSpec(shape=(VOCABULARY_SIZE,), dtype=tf.float32)
13951395
# tf.TensorSpec(shape=(1, MAX_SEQ_LENGTH), dtype=tf.int32), # Nested input
13961396
# tf.TensorSpec(shape=(1, VOCABULARY_SIZE), dtype=tf.float32) # Nested one-hot label

0 commit comments

Comments
 (0)