CV之IG之Inception:基于TF框架利用Inception模型+GD算法的某层网络图像生成更大尺寸的Deep Dream幻觉梦境图片(特征可视化实现图像可解释性)案例应用
目录
基于TF框架利用Inception模型+GD算法的某层网络图像生成更大尺寸的Deep Dream幻觉梦境图片(特征可视化实现图像可解释性)案例应用
输出结果
设计思路
部分代码
基于TF框架利用Inception模型+GD算法的某层网络图像生成更大尺寸的Deep Dream幻觉梦境图片(特征可视化实现图像可解释性)案例应用 输出结果TF之TFDeepDream:生成更大尺寸的Deep Dream图像
from __future__ import print_function
……
import tensorflow as tf
# 1、创建图和Session
graph = tf.Graph()
sess = tf.InteractiveSession(graph=graph)
……
channel = 1?9
layer_output = graph.get_tensor_by_name("import/%s:0" % name)
……
7、
render_multiscale(layer_output[:, :, :, channel], img_noise, iter_n=20)