第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Moblenet V2:將生產(chǎn)者版本較低的圖導(dǎo)入生產(chǎn)者版本較高的圖

Moblenet V2:將生產(chǎn)者版本較低的圖導(dǎo)入生產(chǎn)者版本較高的圖

慕妹3242003 2021-07-01 05:43:06
我開發(fā)了一個遷移學(xué)習(xí)應(yīng)用程序,我正在為我的數(shù)據(jù)流重新訓(xùn)練 MobileNetV2。我正在使用來自 tensorflow-hub 的retrain.py重新訓(xùn)練模型并且沒有進(jìn)行任何修改。當(dāng)我從終端運行腳本時,在將模型下載到我的用戶配置文件中的臨時目錄后,我會直接收到此警告。Importing a graph with a lower producer version 26 into an existing graph with producer version 27. Shape inference will have run different parts of the graph with different producer versions.在調(diào)試過程中,我創(chuàng)建了一個test.py腳本來找出警告的來源:import tensorflow as tfimport tensorflow_hub as hubdef create_module_graph(module_spec):  """Creates a graph and loads Hub Module into it.  Args:    module_spec: the hub.ModuleSpec for the image module being used.  Returns:    graph: the tf.Graph that was created.    bottleneck_tensor: the bottleneck values output by the module.    resized_input_tensor: the input images, resized as expected by the module.    wants_quantization: a boolean, whether the module has been instrumented      with fake quantization ops.  """  FAKE_QUANT_OPS = ('FakeQuantWithMinMaxVars',                     'FakeQuantWithMinMaxVarsPerChannel')  height, width = hub.get_expected_image_size(module_spec)  with tf.Graph().as_default() as graph:    resized_input_tensor = tf.placeholder(tf.float32, [None, height, width, 3])    m = hub.Module(module_spec)    bottleneck_tensor = m(resized_input_tensor)    wants_quantization = any(node.op in FAKE_QUANT_OPS                             for node in graph.as_graph_def().node)  return graph, bottleneck_tensor, resized_input_tensor, wants_quantizationdef main():   module_spec = hub.load_module_spec('https://tfhub.dev/google/imagenet/mobilenet_v2_100_96/classification/2')   graph, bottleneck_tensor, resized_input_tensor, wants_quantization = create_module_graph(module_spec)if __name__ =='__main__':   main()并發(fā)現(xiàn)它起源create_module_graph于retrain.py. 當(dāng)我使用從終端運行腳本時python test.py,我從上面收到生產(chǎn)者警告。但是,當(dāng)我main()從 ipython 控制臺運行時,我沒有收到生產(chǎn)者版本警告。當(dāng)我所做的只是從 tensorflow-hub 存儲庫創(chuàng)建圖表時,我不確定為什么會發(fā)生這種情況。我查看了版本兼容性文檔,沒有看到與錯誤特別相關(guān)的任何內(nèi)容。查看源代碼,似乎表明我的圖形在構(gòu)建之前已減少到最低版本。這是需要擔(dān)心的嗎?它會改變您加載圖表以進(jìn)行預(yù)測的方式嗎?
查看完整描述

1 回答

?
侃侃爾雅

TA貢獻(xiàn)1801條經(jīng)驗 獲得超16個贊

從我的 tensorflow-hub問題

TensorFlow Hub 模塊包含tf.GraphDefs核心,這些模塊具有格式版本號,以幫助將圖形正確導(dǎo)入到較新版本的 TensorFlow。碰巧的是,在 2018 年 3 月 31 日公開發(fā)布的 TF-Hub 模塊上傳和當(dāng)前 TensorFlow 版本之間,此格式版本從 26 增加到 27。

但是,我們目前還沒有意識到形狀推斷中報告的變化對模塊用戶有任何可見的影響,因此我們目前的建議是忽略這些警告。它們將隨著模塊的下一次刷新而消失。


查看完整回答
反對 回復(fù) 2021-07-13
  • 1 回答
  • 0 關(guān)注
  • 325 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號