Closed ydennisy closed 3 years ago
While I can't comment on the details of performance in your case, here are some general observations:
For a complete example of the Dataset.map() approach, see https://www.tensorflow.org/tutorials/text/solve_glue_tasks_using_bert_on_tpu and ignore the TPU specifics if you are targeting GPUs.
All that said, is there a concrete, actionable defect with the TensorFlow Hub models, library or documentation that needs tracking here? If yes, please provide a compete reproduction and an explanation of what goes wrong. If not, let's close this issue. We recommend StackOverflow (specifically, tag tensorflow-hub) for general how-to and support questions.
@arnoegw thanks for that - makes perfect sense.
I will close!
Hi,
When running a BERT model as part of a larger model the preprocess layer seems to run on CPU and then the main BERT component on GPU - this involves lots of ops moving data back and forth and is prohibitively slow.
Is there a way to force all the ops to run on GPU?
Thanks!