You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
When the default vocav path of data/utils.py was changed to a 250,000 vocab and executed in colab. The Below error code occurred. an error presumed to be a vocab size mismatch occurred. How can it be solved?
question_1 = "Processed input: translate English to German: "Luigi often said to me that he never wanted the brothers to end up in court," she wrote." #@param {type:"string"}
questions = [question_1]
now = time.time()
predict_inputs_path = os.path.join(prediction_dir, "predict_inputs_%d.txt" % now)
predict_outputs_path = os.path.join(prediction_dir, "predict_outputs_%d.txt" % now)
with tf.io.gfile.GFile(predict_inputs_path, "w") as f:
for q in questions:
f.write(q.lower())
model.batch_size = 8 # Min size for small model on v2-8 with parallelism 1.
model.predict(
input_file=predict_inputs_path,
output_file=predict_outputs_path,
# Select the most probable output token at each step.
temperature=0,
)
When the default vocav path of data/utils.py was changed to a 250,000 vocab and executed in colab. The Below error code occurred. an error presumed to be a vocab size mismatch occurred. How can it be solved?
my code
model_parallelism, train_batch_size, keep_checkpoint_max = (1, 256, 16)
model = t5.models.MtfModel(
model_dir = 'gs://mt5_wayfarer/small',
tpu=TPU_ADDRESS,
tpu_topology=TPU_TOPOLOGY,
model_parallelism=model_parallelism,
batch_size=train_batch_size,
)
question_1 = "Processed input: translate English to German: "Luigi often said to me that he never wanted the brothers to end up in court," she wrote." #@param {type:"string"}
questions = [question_1]
now = time.time()
predict_inputs_path = os.path.join(prediction_dir, "predict_inputs_%d.txt" % now)
predict_outputs_path = os.path.join(prediction_dir, "predict_outputs_%d.txt" % now)
with tf.io.gfile.GFile(predict_inputs_path, "w") as f:
for q in questions:
f.write(q.lower())
model.batch_size = 8 # Min size for small model on v2-8 with parallelism 1.
model.predict(
input_file=predict_inputs_path,
output_file=predict_outputs_path,
# Select the most probable output token at each step.
temperature=0,
)
error code
InvalidArgumentError: From /job:worker/replica:0/task:0:
9 root error(s) found.
(0) Invalid argument: Run-time shape mismatch for TPUExecute argument[90] (VarHandles_17697799040045632952/_2:88). Expected element_type: F32
dimensions: 512
dimensions: 250240
layout {
minor_to_major: 1
minor_to_major: 0
format: DENSE
}
is_dynamic_dimension: false
is_dynamic_dimension: false
; got element_type: F32
dimensions: 512
dimensions: 250112
layout {
minor_to_major: 1
minor_to_major: 0
format: DENSE
}
is_dynamic_dimension: false
is_dynamic_dimension: false
(1) Invalid argument: Run-time shape mismatch for TPUExecute argument[90] (VarHandles_17697799040045632952/_2:88). Expected element_type: F32
dimensions: 512
dimensions: 250240
layout {
minor_to_major: 1
minor_to_major: 0
format: DENSE
}
is_dynamic_dimension: false
is_dynamic_dimension: false
; got element_type: F32
dimensions: 512
dimensions: 250112
layout {
minor_to_major: 1
minor_to_major: 0
format: DENSE
}
is_dynamic_dimension: false
is_dynamic_dimension: false
(2) Invalid argument: Run-time shape mismatch for TPUExecute argument[90] (VarHandles_17697799040045632952/_2:88). Expected element_type: F32
dimensions: 512
dimensions: 250240
layout {
minor_to_major: 1
minor_to_major: 0
format: DENSE
}
is_dynamic_dimension: false
is_dynamic_dimension: false
; got element_type: F32
dimensions: 512
dimensions: 250112
layout {
minor_to_major: 1
minor_to_major: 0
format: DENSE
}
is_dynamic_dimension: false
is_dynamic_dimension: false
The text was updated successfully, but these errors were encountered: