RuntimeError: Intra op parallelism cannot be modified after initialization.
Issue : (In google colab) the following error is flashed when trying to set number of threads.
RuntimeError: Intra op parallelism cannot be modified after initialization.
Following code is responsible for this error:
tf.config.threading.set_intra_op_parallelism_threads(1)
tf.config.threading.set_inter_op_parallelism_threads(1)
It allows to change inter op parallelism, but not intra op parallelism.
Solution: Restart the runtime and the error will go.
The error will not be flashed if the above code is already there by the time you start afresh.
No comments:
Post a Comment