-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tf.ConfigProto usage on TF 2.0 #25446
Comments
Potentially related: #25138. |
Gaurav is working on a proper replacement, it's not ready yet, for now please use compat.v1. |
We don't know how to use |
@girving - If you use the upgrade script on your original TensorFlow model, |
(and you should be able to use tf.compat.v1.ConfigProto to create the
config parameter)
|
If I want to experiment with writing "true TF 2.0 code", will |
No. We will split ConfigProto and replace it with a number of functions
configuring different parts of the runtime. You can wait for that if you
want: what will definitely be true is that any future solution here will
require only a local change.
|
@jaingaurav I use |
allow_growth appears to be an essential hack to fix some cudnn issue on rtx20xx devices. config.gpu_options.allow_growth = True |
A number of new API were added in |
Looks like you can do this in TF 2.0 now like this:
|
@opcecco you are a lifesaver. |
I have placed this right before defining a keras Model() instance and compiling it. My taskmanager yet still shows that indepdently all video card memory is taken. What am I doing wrong? |
how do we add this in C++? |
The C++ API still uses sessions, so use the session config as you would in 1.x. |
On TensorFlow 1.X, there are various important parameters set by passing
tf.ConfigProto
totf.Session(config=...)
ortf.enable_eager_execution(config=...)
. For example, to useNCCL
, it is useful to set the visible GPUs for a session withconfig.gpu_options.visible_device_list
.My understanding is that TensorFlow 2.0 no longer has a way to set this configuration — both
tf.Session
andtf.enable_eager_execution
are gone. Is there an alternate way to set this config?Related StackOverflow question
CC @girving @allenlavoie
The text was updated successfully, but these errors were encountered: