[英]Loading tensorflow 1.x.x model into tensorflow 2.x.x
我有一個用 TF1 創建的SavedModel
被 TF2 加載。
我收到了圖中似乎每個變量的警告,即:
WARNING:tensorflow:Unable to create a python object for variable <tf.Variable 'Encoder_en/hidden_layers/tanh_layer_0/bias:0' shape=(512,) dtype=float32_ref> because it is a reference variable. It may not be visible to training APIs. If this is a problem, consider rebuilding the SavedModel after running tf.compat.v1.enable_resource_variables().
我想最好修復這個警告,或者只是壓制它!
到目前為止,我已經嘗試過:
# In my python app
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# In my Dockerfile
ENV TF_CPP_MIN_LOG_LEVEL 2
編輯:這個 model 來自 tensorflow 集線器,因此我沒有構建它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.