[英]Convert an TF Agents ActorDistributionNetwork into a Tensorflow lite model
我想將ActorDistributionModel從經過訓練的PPOClipAgent轉換為 Tensorflow Lite model 以進行部署。 我應該如何做到這一點? 我嘗試按照本教程進行操作(請參閱底部將策略轉換為 TFLite 的部分),但是 .network 輸出單個操作(策略)而不 ...
[英]Convert an TF Agents ActorDistributionNetwork into a Tensorflow lite model
我想將ActorDistributionModel從經過訓練的PPOClipAgent轉換為 Tensorflow Lite model 以進行部署。 我應該如何做到這一點? 我嘗試按照本教程進行操作(請參閱底部將策略轉換為 TFLite 的部分),但是 .network 輸出單個操作(策略)而不 ...
[英]Tf-agent Actor/Learner: TFUniform ReplayBuffer dimensionality issue - invalid shape of Replay Buffer vs. Actor update
我嘗試使用TFUniformReplayBuffer而不是僅適用於 linux 機器的ReverbReplayBuffer將此tf-agents actor<->learner DQN Atari Pong 示例改編為我的 windows 機器,但我面臨尺寸問題。 問題如下:根據這篇de ...
[英]What controls the second dimension of tf observations/ what a qnet accepts in its place?
精簡版。 我找不到控制任何一個的變量: A) 軌跡中變量的第 2 維,例如第 3 維 或 B) qnet 在訓練期間需要的維數? 我正在關注本教程: https://www.tensorflow.org/agents/tutorials/1_dqn_tutorial 通過將打印插入教程中,如下 ...
[英]tf_agents dqn fails to initialize
即使 tf.agents initialize() 不需要輸入變量,這一行 產生此錯誤 我試過 agent.initialize(agent) 因為它顯然想要自我傳遞......顯然這不起作用 XD 我懷疑問題可能是這條線 生產 但這可能是正常的... ###################### ...
[英]inheritted method from PyEnvironment causes error because underscore at start of function name
我收到以下錯誤。 我從來沒有真正制作過 function _reset 所以它必須來自 py_environment.PyEnvironment 下面的代碼 我怎樣才能解決這個問題? 為什么會這樣? 如果它來自 py_environment.PyEnvironment 它不是內置的嗎? 為什么內置 ...
[英]Problem with input shape of Conv1d in tfagents sequential network
我使用 tfagent 創建了一個交易環境 並傳遞了 100000 行的 df,其中僅使用收盤價,其中 numpy 數組包含 100000 個股票價格時間序列數據 在每一步,代理人都可以訪問之前的 1000 個價格 + 當前股票價格 = 1001 它可以從 0,1,2 采取 3 種可能的行動然后我將 ...
[英]How to store tf-agents' trajectory object in big query from python and retrieve it back as the trajectory object
我想將來自 tf-agents 的軌跡保存到一個大查詢表中,並希望根據需要再次將它們檢索到 python 中。 在 python 數據框中,軌跡被保存為軌跡對象。 但是,我不確定如何將這些軌跡對象保存到大查詢中並將它們檢索回 python。 將它們保存為字符串不起作用,也不能在大查詢中保存個人組件 ...
[英]Error when saving model with tensorflow-agents
我正在嘗試使用 tensorflow-agents 保存模型。 首先我定義如下: 然后像這樣保存模型: 這在 google colab 中工作正常,但我在本地 PC 中收到以下錯誤。 這些是我正在使用的庫版本: 張量流 2.9.1 tf-代理 0.11.0 ...
[英]Error while importing tf_agents in google colab
我無法理解問題是什么。 當我嘗試導入 tfagent 時,它會拋出此錯誤 'function() 有一個意外的關鍵字參數'reduce_retracing' 在谷歌 colab 中。 我重新安裝了所有軟件包,但仍然給我同樣的錯誤。 ...
[英]How to use the replay buffer in tf_agents for contextual bandit, that predicts and trains on a daily basis
我將 tf_Agents 庫用於上下文強盜用例。 在這個用例中,每天進行預測(每天范圍在 20k 到 30k 之間,每個用戶 1 個)(每天多次)並且只對 4 天前的所有預測數據進行訓練(因為預測標簽需要 3 天才能完成)觀察)。 驅動程序似乎只重播 batch_size 數量的經驗(因為上下文強盜 ...
[英]TF-Agents TypeError: The two structures do not match, next_step_type, policy_info
嗨,提前謝謝你, 我試圖在 tf-agents 中運行自定義環境並獲得以下信息 我能弄清楚的唯一區別是我的觀察包含值next_step_type和policy_info ,它們不在我的 time_step_spec 中。 我不確定這些值是在哪里生成的。 因為代碼比較多,所以省略了一部分,請指教需要 ...
[英]How to pass the batchsize for a custom environment in Tf-agents
我正在使用 tf-agents 庫構建上下文強盜。 為此,我正在構建一個自定義環境。 我正在創建一個 banditpyenvironment 並將其包裝在 TFpyenvironment 中。 tfpyenvironment 自動添加批量大小維度(在觀察規范中)。 我需要在 _observe 和 ...
[英]TFAGENTS: clarification on the usage of observation_and_action_constraint_splitter for DqnAgent agents
根據這篇文章,我正在嘗試創建一個帶有有效/無效操作掩碼的 DqnAgent 代理,我應該為observation_and_action_constraint_splitter arg 指定一個splitter_fn 。 根據 tf_agents 文檔 , splitter_fn會是這樣的: 在我看來 ...
[英]TF-Agents getting malloc error while training
在嘗試使用 tf-agents 庫來訓練 DQN 時,我遇到了 malloc 錯誤的問題。 規格: M1 mac os 12 TF 2.6.2,tf-agents 0.10.0 Python 3.8(3.9 的結果相同)我使用自定義環境,包裝到 TF 環境中。 其他一切都是 tf-agents 的默 ...