国产探花免费观看_亚洲丰满少妇自慰呻吟_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由于版本問題出現的幾種錯誤及解決方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林站長站。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 巴楚县| 偏关县| 那曲县| 五峰| 孟州市| 琼海市| 永州市| 商河县| 米泉市| 烟台市| 莱州市| 海兴县| 黑龙江省| 新田县| 紫金县| 巴南区| 江川县| 大竹县| 什邡市| 宁波市| 金山区| 礼泉县| 滨州市| 遵义市| 卢湾区| 科技| 安义县| 龙陵县| 华蓥市| 美姑县| 石泉县| 同德县| 石屏县| 武宁县| 新绛县| 全州县| 江永县| 海口市| 道孚县| 江门市| 苗栗市|