小编apf*_*alz的帖子

张量流量梯度

我正在尝试调整tf DeepDream教程代码以使用其他模型.现在我打电话给tf.gradients()时:

t_grad = tf.gradients(t_score, t_input)[0]
g      = sess.run(t_grad, {t_input:img0})
Run Code Online (Sandbox Code Playgroud)

我收到类型错误:

TypeError: Fetch argument None of None has invalid type <type 'NoneType'>,     
must be a string or Tensor. (Can not convert a NoneType into a Tensor or 
Operation.)
Run Code Online (Sandbox Code Playgroud)

我应该在哪里开始寻找修复此错误?

是否可以将tf.gradients()与其中包含Optimizer的模型一起使用?

gradient tensorflow

5
推荐指数
1
解决办法
4198
查看次数

标签 统计

gradient ×1

tensorflow ×1