国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

淺談Tensorflow由于版本問題出現的幾種錯誤及解決方法

2020-02-15 21:51:13
字體:
來源:轉載
供稿:網友

1、AttributeError: 'module' object has no attribute 'rnn_cell'

S:將tf.nn.rnn_cell替換為tf.contrib.rnn

2、TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

S:由于tf.concat的問題,將tf.concat(1, [conv1, conv2]) 的格式替換為tf.concat( [conv1, conv2],1)

3、AttributeError: 'module' object has no attribute 'pack'

S:將pack替換為stack

4、ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)

S:按照提示,需要將括號內的形參寫出,即(logits=pre, lables=tru)而非(pre,tru)

5、ValueError: Variable Wemb/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

S:需要定義scope,雖然報錯可能是在optimizer處提示,但需要在定義模型時增加scope,即

with tf.variable_scope(tf.get_variable_scope()) as scope:# model construction

以上這篇淺談Tensorflow由于版本問題出現的幾種錯誤及解決方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林站長站。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 南澳县| 修文县| 秦皇岛市| 穆棱市| 山阴县| 衢州市| 临桂县| 宜春市| 赤水市| 渝中区| 沁水县| 岳阳市| 佛山市| 江达县| 汾阳市| 大悟县| 花垣县| 澄江县| 德昌县| 深圳市| 方正县| 大城县| 临夏市| 定安县| 登封市| 崇信县| 曲阜市| 张家口市| 桓台县| 小金县| 贺兰县| 玉环县| 上思县| 谢通门县| 墨脱县| 金乡县| 古蔺县| 和龙市| 河池市| 蒲江县| 和田县|