tensorflow base64字符串字符替换中出现的问题

import tensorflow as tf
import tensorflow.contrib.eager as tfe
tfe.enable_eager_execution()
                             
image = tf.gfile.GFile('/export/App/preserver/base64_dog2.txt').read()
image = tf.Print(image,[image])
image = tf.convert_to_tensor(image, dtype=tf.string)
image = tf.strings.regex_replace(image,"\\+","-")
image = tf.strings.regex_replace(image,"/","_")
image = tf.strings.regex_replace(image,"=","")
#image = tf.strings.regex_replace(image,"a7wm+s/","**********************8")
image = tf.Print(image,[image])
image = tf.convert_to_tensor(image, dtype=tf.string)
image = tf.decode_base64(image)
image = tf.image.decode_image(image)

猜你喜欢

转载自blog.csdn.net/qq_32110859/article/details/85265136
今日推荐