-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SRGAN转为.pb #1125
Comments
The AttributeError problem can be solved by the following methods. |
the problenr can be solved by the following methods |
The source address:
https://github.com/tensorlayer/srgan
I want to convert part of the get_G network in model.py to a.pb file.I didn't use the pre-training model,direct use model to.pb file.but, AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_TensorLike'.I'm not familiar with tensorlayer code,plase help me .
my code(to .pb file)
G = get_G()
input_signature=tf.TensorSpec([1,128,128,3])
output_tensor=G.infer.get_concrete_function(x=input_signature)
frozen_func = convert_variables_to_constants_v2(output_tensor)
frozen_func.graph.as_graph_def()
pb_dir = r'srgan.pb'
tf.io.write_graph(graph_or_graph_def=frozen_func.graph,logdir="models/pb",name=pb_dir,as_text=False)
print('done')
The text was updated successfully, but these errors were encountered: