![](/img/trans.png)
[英]how to downgrade python3.8.10 to 3.5.6 on ubuntu via the terminal?
為了安裝舊版本的 keras,需要 tensorflow 1.10.0。 這應該可以解決我正在嘗試運行的算法的兼容性問題。 能夠安裝這些舊版本的 tensorflow 和 keras 以及舊版本的 python 是必需的。 我嘗試使用我的 linux 系統、終端使用不同的算法,但到目前為止還沒有成 ...
[英]how to downgrade python3.8.10 to 3.5.6 on ubuntu via the terminal?
為了安裝舊版本的 keras,需要 tensorflow 1.10.0。 這應該可以解決我正在嘗試運行的算法的兼容性問題。 能夠安裝這些舊版本的 tensorflow 和 keras 以及舊版本的 python 是必需的。 我嘗試使用我的 linux 系統、終端使用不同的算法,但到目前為止還沒有成 ...
[英]Get memory usage after each training epoch - Tensorflow version 1.15
我正在使用需要 tensorflow 版本 1.15 的代碼。 但是,我想記錄 memory 在 BERT model 的每個訓練周期后使用的數量。在 tensorflow 版本 2 中,這可以通過tf.config.experimental.get_memory_usage來實現。 我怎樣才能對 ...
[英]Equivalent of tf.contrib.legacy_seq2seq.attention_decoder in tensorflow 2 after upgrade
我在 TensorFlow 1.0 中有以下代碼。 我嘗試使用 tf_upgrade_v2 腳本將它遷移到 TensorFlow 2.0。 但是,它沒有在 tf-2 精簡版中找到等效的 function。 我被推薦使用 tensorflow_addons。 但是,我在 tf_addons 模塊中沒 ...
[英]convert a TPU tensorflow=1.15 model for deployment on GPU
我正在努力將經過 TF1.15 TPU 訓練的 model 加載到 GPU。 model 目錄有以下文件: 我從 Google 看到這些說明:from tensorflow.python.saved_model import loader from tensorflow.python.saved ...
[英]batch size > 1 gives an error using TensorFlow 1.x
我正在使用這個VAE 示例。 我所做的唯一區別是將損失從二元交叉熵更改為 MSE,如下所示: 在運行原始架構時,model 運行完美(2 個 MLP 層),無論批次大小如何(在 github 代碼中指定為“無”)。 我試圖將其更改為卷積 model,但是當我僅將編碼器更改為此時: 運行 model ...
[英]tensorflowjs compatible version for tf==1.15 for tf_saved_model to tfjs conversion
我在tensorflow訓練了一個object檢測model。 我的環境-- tf 版本 == 1.15,.network== ssd mobi.net v2 現在我想將我的 saved_model(.pb) 文件轉換為 tfjs(.json) 格式。 我按照以下步驟操作—— pip 安裝 ten ...
[英]How could I convert Tensorflow version 1 to onnx model?
我試過python -m tf2onnx.convert --saved-model [file_name] --output [onnx_file_name] 。 但它由tensorflow = 2.4.4自動運行。 我想運行 tensorflow 版本 1 代碼。 這段代碼可以選擇嗎? ...
[英]Run the code tensorflow 1.15 in tensorflow 2.7
我想運行使用 tensorflow == 1.15 但在我的系統上安裝了 tensorflow 2.7 的代碼。 According to Tensorflow at this address https://www.tensorflow.org/guide/migrate/migrate_tf ...
[英]Adam optimizer between Tf 1 and Tf 2
我試圖在 Tf1 和 Tf2 之間復制相同的結果。 下面是一個使用 Adam 優化器的簡單示例。 在 TF2 中: x 是:<tf.Variable 'Variable:0' shape=(3,) dtype=float32, numpy=array([0.49998665, 1.49998 ...
[英]TypeError: List of Tensors when single Tensor expected due to tensor_scatter_update
看看下面的代碼示例: 我用一個簡單的案例來描述我面臨的問題這個 function (myFun) 被稱為 tf.while_loop 的主體(如果相關) my_tensor 的定義 如何定義 tf.tensor_scatter_update 的 indices 參數? 我正在使用 tensorflo ...
[英]Define a tensor of constants for tf.while_loop
我想以某種方式在tf.while_loop中維護一個可以支持以下功能的常量列表我能夠在索引處讀取和寫入(多次)常量值我可以通過檢查它在索引處的值與某個常量來運行tf.cond TensorArray在這里不起作用,因為它不支持重寫。 我還有什么其他選擇? ...
[英]How to perform pruning on trained object detection model?
嗨,我已經使用 tensorflow 1.14 對象檢測 API 訓練了對象檢測模型,我的模型表現良好。 但是,我想減少/優化模型的參數以使其更輕。 如何在經過訓練的模型上使用修剪? ...
[英]Targets in custom loss and custom metric function in tf.Keras
我正在創建一個使用自定義損失和自定義指標函數編譯的 tf.keras.model。 我使用 x=input_batch 和 y=someFunction(targets) 在模型上調用 train_on_batch 自定義損失函數和自定義指標函數的簽名看起來像 methodname(y_true, ...
[英]In tensorflow 1.15, what's the difference of using explicit XLA compilation and Auto-clustering?
我正在嘗試學習如何將 XLA 用於我的模型。 我在這里查看官方文檔:https://www.tensorflow.org/xla#enable_xla_for_tensorflow_models 。 據記載,有兩種方法可以啟用 XLA:1) 使用@tf.function(jit_compile=T ...
[英]AttributeError: module 'tensorflow.compat.v2' has no attribute 'depth_to_space'
我正在嘗試運行一個代碼,它是用 tensorflow 版本 1.4.0 編寫的我在 google colab 上運行我的代碼,它給出了 tensorflow 版本 2.x。 為了運行我的代碼,我使用了向后兼容性,例如:將import tensorflow as tf替換為 它適用於某些事情,但在某 ...
[英]Local Gradient Aggregation for Horovod using Tensorflow 1.X
我正在嘗試使用 Horovod 在不同的服務器上分發訓練 GPU。 按照這里的建議。 我想實現局部梯度聚合。 在解釋中,修改看起來很簡單optimizer = hvd.DistributedOptimizer(opt, backward_passes_per_step=4) 。 但是嘗試在我的示例 ...
[英]How to convert TensorFlow checkpoint files to TensorFlowJS?
我認為我有一個在 TensorFlow v1 上開發的項目。 它在 Python 3.8 中工作,如下所示: 檢查點文件位於“checkpoint_dir”中我想將它與 TFjs 一起使用,但我不知道如何將檢查點文件轉換為可以用 TFjs 加載的東西。 我應該怎么辦? 謝謝, 約翰 ...
[英]Batching in Tensorflow1 and Tensorflow2
我正在嘗試將圖像單應性代碼從版本 TF1 轉換為 TF2,只是 TF 腳本轉換在這里不起作用。 我堅持對數據集進行批處理,因為圖像、image_patch 和 image_Indices 具有不同的形狀。 雖然 TF1 在攝取和批處理數據集包方面沒有問題,但 TF2 卻遇到了麻煩。imgs= np. ...
[英]protoc can't be installed : not find a version that satisfies the requirement protoc
我將在 windows 10 (python 3.7.2) 上安裝 protoc 我應該怎么辦? 有人可以幫助我嗎? ...
[英]Installing version 1.15 of tensorflow-serving-api to Centos 8
我正在嘗試將 Tensorflow-serving 安裝到我的 Centos 8 機器上。 使用 Docker 映像安裝不是 Centos 的選項。 所以我嘗試用 pip 安裝。 這些是安裝 tensorflow-model-server 的命令: 問題是我需要 1.15.0 版本,但找不到如何修 ...