-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
updated tfutil for tensorflow 2.x #23
base: master
Are you sure you want to change the base?
Conversation
some commands were depreciated in 2.x, so I fixed it
@@ -125,7 +125,7 @@ def assert_tf_initialized(): | |||
raise RuntimeError("No default TensorFlow session found. Please call dnnlib.tflib.init_tf().") | |||
|
|||
|
|||
def create_session(config_dict: dict = None, force_as_default: bool = False) -> tf.Session: | |||
def create_session(config_dict: dict = None, force_as_default: bool = False) -> tf.compat.v1.Session: | |||
"""Create tf.Session based on config dict.""" | |||
# Setup TensorFlow config proto. | |||
cfg = _sanitize_tf_config(config_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 132, I had to also update
config_proto = tf.compat.v1.ConfigProto()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, do you have full working code for this repo but using tf 2.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atreeleaf I'll review the codebase again and replace any other depreciated functions. Thanks for bringing this to my attention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atreeleaf @PsVenom
Hi all! Is there a running Tensorflow2 compatible StyleGAN2 Colab notebook? Thank you!
您好,您发给嘉伟的邮件已经收到。。。
|
1 similar comment
您好,您发给嘉伟的邮件已经收到。。。
|
Hi all! Is there a running Tensorflow2 compatible StyleGAN2 Colab notebook? Thank you! |
您好,您发给嘉伟的邮件已经收到。。。
|
some commands were depreciated in 2.x, so I fixed it by using tf.compat.v1