ValueError: GraphDef cannot be larger than 2GB.

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wxf2012301351/article/details/82756126

solution: 不是用默认graph
用例:
import tensorflow as tf
g1 = tf.Graph()
with g1.as_default():
c1 = tf.constant([1.0])
with tf.Graph().as_default() as g2:
c2 = tf.constant([2.0])

with tf.Session(graph=g1) as sess1:
print sess1.run(c1)
with tf.Session(graph=g2) as sess2:
print sess2.run(c2)
参考:
https://www.cnblogs.com/lienhua34/p/5998853.html
https://stackoverflow.com/questions/36349049/overcome-graphdef-cannot-be-larger-than-2gb-in-tensorflow

猜你喜欢

转载自blog.csdn.net/wxf2012301351/article/details/82756126