I'm using dell laptop with GTX 960M, and i installed tensorflow 2.0 alpha. i used to use 1.5 version and it work with tf.GPUOptions, but in this version, this causes an error: AttributeError: module 'tensorflow' has no attribute 'GPUOptions'
someone help me if i do the thing wrong with this version
Traceback (most recent call last): File "prepare_training.py", line 20, in gpu_option = tf.GPUOptions(per_process_gpu_memory_fraction=0.333) AttributeError: module 'tensorflow' has no attribute 'GPUOptions'
Tensorflow 2.x has undergone major changes from 1.x.
As per official communication,
tf.contrib will be removed from the core TensorFlow repository and build process. TensorFlow’s contrib module has grown beyond what can be maintained and supported in a single repository. Larger projects are better maintained separately, while smaller extensions will graduate to the core TensorFlow code. A special interest group (SIG) has been formed to maintain and further develop some of the more important contrib projects going forward. Please engage with this RFC if you are interested in contributing.
If you want to use the tensorflow 1.x
functions/methods, there is a compatibility module kept in tensorflow 2.x
.
tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.333)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With