tensorflow==2.6.2
tensorflow-gpu==2.6.2
python==3.6
试了网上的numpy降低,没用,也试了改array_ops.py,没用
原代码:
def save_result(img_, str_):
result = Image.fromarray(np.uint8(np.clip(img_, 0, 255.0)))
result.save(str_)
更改后的代码:
def save_result(img_, str_,sess):
img=img_.eval(session=sess)
result = Image.fromarray(np.uint8(np.clip(img, 0, 255.0)))
result.save(str_)
注意:sess