cost 144 ms
tensorflow 指標中的奇怪行為

[英]Weird behaviour in tensorflow metric

我創建了一個 tensorflow 指標,如下所示: 該指標添加到model.compile中,如下所示: 這應該在一半時間返回 0,在另一半時間返回 1。 因此,在訓練我的 model 時,我應該看到該指標的值約為 0.5。 然而它始終為 0。 關於為什么的任何想法? ...

Tensorflow2 For循環圖執行Valuerror

[英]Tensorflow2 For loop Graph Execution Valuerror

賞金將在 6 天后到期。 此問題的答案有資格獲得+50聲望賞金。 stander Qiu正在尋找一個規范的答案。 我正在使用 TF2 進行超參數優化。 例如,我定義了一個學習率范圍lr= [0.0001, 0.001, 0.01]以傳遞給包含自定義訓練循環(使用Gradientape )的Tra ...

Conv2D 過濾器和 CNN 架構

[英]Conv2D filters and CNN architecture

我目前正在攻讀本科,我正在研究 CNN model 以識別 Telegu 字符。 這個問題有兩個部分, 我有一個 (32,32,1) 形狀的 Telegu 字符圖像,我想訓練我的 CNN model 來識別字符。 那么,我的 model 架構應該是什么以及如何確定架構、參數和隱藏層的數量。 我知道我 ...

keras evaluate() 使用最佳 model 不是最后 model

[英]keras evaluate() using best model not last model

我正在使用ModelCheckpoint save_best_only=True和EarlyStopping patience=5訓練我的 model。 我使用我的測試數據進行驗證。 當使用相同的測試數據和相同的回調應用evaluate()時,我得到與最后一個時期模型的val_指標相同的指標,而不 ...

如何在自定義訓練tensorflow中編譯保存model

[英]how to compile and save the model in custom training tensorflow

我嘗試按照 tensorflow 教程編寫自定義訓練循環。 它給出了 output 如下 在自定義訓練循環中,我不知道如何編譯 model,根據以下標准保存最好的 model,例如“如果驗證集上的損失未能減少或連續 10 個周期保持不變,則 model 將保存到 model .h5 文件,訓練將停 ...

使用數據集 API 和 numpy 數組進行訓練會產生完全不同的結果

[英]Training with Dataset API and numpy array yields completely different results

我有一個 CNN 回歸 model,特征為(2000, 3000, 1)形狀,其中 2000 是樣本總數,每個樣本都是 (3000, 1) 一維數組。 批量大小為 8,整個數據集的 20% 用於驗證。 然而,zip 特征和 label 到tf.data.Dataset給出的分數與直接輸入 numpy ...

根據 custom_training 循環中的標准保存最佳 model

[英]save the best model based on criteria in custom_training loop

我按照 tensorflow 教程編寫了一個自定義訓練循環。 無論如何它的培訓和它產生 output 作為 在我不知道的自定義訓練循環中,如何編譯 model,保存最好的 model 基於“如果驗證集上的損失未能減少或連續 10 個時期保持不變,則 model 將保存到 model.h5 文件和訓 ...

LSTM 命名實體識別 model - 形狀不兼容或邏輯/標簽具有不同的尺寸 - Tensorflow 2.9

[英]LSTM named entity recognition model - shape are incompatible or logits/labels have different dimensions - Tensorflow 2.9

我正在處理 NLP LSTM 命名實體提取 model 但遇到不同的錯誤,下面是有關錯誤的更多詳細信息。 我在木星筆記本中運行這段代碼 Tensorflow 版本 2.9 input 和 output 的長度都是 50 輸入句子:[123 88 170 221 132 52 105 32 211 ...

如何配置checkpoint和earlystopping不發出警告?

[英]How to configure checkpoint and earlystopping so that no warning will be issued?

我的 model 定義如下。 使用了兩個回調。 我想監控 val_accuracy 並根據損失使用提前停止。 為什么總是抱怨“WARNING:tensorflow:Can save best model only with val_accuracy available, skipping.”? ...

部署 TensorFlow 概率回歸 model 作為 Sagemaker 端點

[英]Deploy TensorFlow probability regression model as Sagemaker endpoint

我想在本地開發一個TensorFlow 概率回歸 model並部署為 Sagemaker 端點。 我之前已經像這樣部署了標准 XGB 模型,並且了解到可以像這樣部署 TensorFlow model: 但是,我認為這不會涵蓋例如依賴項: 我需要使用腳本模式還是 Docker? 任何指針將不勝感激。 ...

Tensorflow / CUDA:未檢測到 GPU

[英]Tensorflow / CUDA: GPU not detected

我有兩台配備 NVIDIA GeForce RTX 3060 GPU 的 Windows 11 筆記本電腦,我想在上面運行 Tensorflow。 如果這很重要,那么兩台筆記本電腦都是 Lenovo Legion 5 筆記本電腦,“GPU 工作模式”設置為“混合自動模式”。 第一台筆記本電腦具有以 ...

Keras 保存完整時自定義圖層出錯 model

[英]Keras Custom Layer gives errors when saving the full model

此代碼是一個錯誤的沙箱復制,該錯誤由具有 RESNet 101 主干的較大 Keras model 給出。 錯誤:如果 model 包含自定義層 ConstLayer: 沒有這一行: config['x'] = self.x使用keras.models.load_model加載保存的 model ...

如何將掩蔽損失與 tensorflow2 TimeSeriesGenerator 結合起來

[英]How to combine a masked loss with tensorflow2 TimeSeriesGenerator

我們正在嘗試使用卷積 LSTM 來預測給定過去 7 個時間步長的圖像的值。 我們使用了 tensorflow2 TimeSeriesGenerator 方法來創建我們的時間序列數據: 每個圖像(時間步長)都具有形狀 (55, 50, 1),因此生成器生成了具有形狀 (32, 7, 55, 50, 1 ...

numpy 和 tensorflow 學習中。 get_dummies 不工作

[英]numpy and tensorflow studying. get_dummies not working

我研究的是tensorflow,不是MNIST_small。 我將 notMNIST_small 下載到我的電腦上。 打印(indenpent.shape,sub.shape)#output:(18724,28,28,1)(18724,1) 但是,我認為它必須 (18724, 28, 28, 1) ...

TensorFlow M1 Pro Graph 執行錯誤

[英]TensorFlow on M1 Pro Graph Execution Error

我正在嘗試使用帶有金屬加速的 tensorflow 在我的 Mac(操作系統版本 13.1)上訓練 model,但是當我調用 .fit() 時,我不斷收到以下錯誤: Python:3.10.8 TensorFlow:2.11.0 TensorFlow 金屬:0.70 如果我使用 CPU 進行訓練, ...

tensorflow v2 從頭開始實現 Mini-batch gradient decent 錯誤

[英]Implementation of Mini-batch gradient decent from scratch with tensorflow v2 getting error

我正在嘗試使用 google colab 中的 MNIST 數據集在 tensorflow v2 中從頭開始實現 minibatch 梯度體面。 我收到以下我無法理解的錯誤。 為什么會出現以及可以在 tensorflow v2 中使用 google colab 實施的正確解決方案是什么。 我附上了我 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM