Coloring-greyscale-images
Coloring-greyscale-images copied to clipboard
full version run fit_generator failed
env: tensorflow-gpu 1.15.0,keras 2.3.1,cudakit 10.0.130,cudann 7.6.5
when run full version, encountered following problems, try global_variables_initializer, can't resolve:
2020-04-25 20:43:26.316669: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
Traceback (most recent call last):
File "D:/work/py/Coloring-greyscale-images/Full-version/full_version.py", line 112, in
Alpha and beta version can work normally in the same enviroment.
In the full version, if I replaced the following code in create_inception_embedding function ,the code could continue to run. with inception.graph.as_default(): embed = inception.predict(grayscaled_rgb_resized)
But, I tested the create_inception_embedding function with a single input tensor, it could work.
I have changed to tensorflow 2.1 env, and it's ok now.
But I don't know why the problems above occurred yet...
@broadwit can you please send the code that you changed? I'm stuck on the same issue
Sorry wrong user here...
On Fri, 19 Mar 2021, 12:27 pm jeanpierrefakhry, @.***> wrote:
@broadwit https://github.com/broadwit can you please send the code that you changed? I'm stuck on the same issue
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/emilwallner/Coloring-greyscale-images/issues/12#issuecomment-802956181, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMTVEBAHGXC2OXFMX55G2TTEN3PXANCNFSM4MQXPTRA .
What @Maitreya-Stark ? i didn't really understand what you said
Alpha and beta version can work normally in the same enviroment.
In the full version, if I replaced the following code in create_inception_embedding function ,the code could continue to run. with inception.graph.as_default(): embed = inception.predict(grayscaled_rgb_resized)
But, I tested the create_inception_embedding function with a single input tensor, it could work.
What did you change it too @broadwit ? Im having the same issue
@GreihMurray I solved this issue by replacing
inception = InceptionResNetV2(weights='imagenet', include_top=True)
inception.graph = tf.get_default_graph()
with
graph = tf.Graph()
with graph.as_default():
sess = tf.compat.v1.Session(graph=graph)
with sess.as_default():
inception = InceptionResNetV2(weights='imagenet', include_top=True)
inception.graph = tf.compat.v1.get_default_graph()
Hope that helps!
@jeanpierrefakhry hey thanks for the reply, just to be clear, is that running with the up to date versions of tenserflow and keras?
@GreihMurray tensorflow 2.1.0
Awesome, thank you
@jeanpierrefakhry what was the verison for keras you have used? Thanks