问题描述
我正在使用TensorFlow 2中的样式转换应用程序,但是我不知道如何获取激活函数的输出。
在TensorFlow 1中可以这样完成:
# Assign the content image to be the input of the VGG model.
sess.run(model['input'].assign(content_image))
# Select the output tensor of layer conv4_2
out = model['conv4_2']
# Set a_C to be the hidden layer activation from the layer we have selected
a_C = sess.run(out)
但是我不确定如何在TensorFlow 2中做到这一点。
此外,在代码的稍后部分,out变量将已在其他输入中重复使用。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)