浏览代码

Checking if the Past action is null before feeding into inference (#3403)

/release-0.14.0
GitHub 4 年前
当前提交
c4d966fb
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 8
      com.unity.ml-agents/Runtime/InferenceBrain/GeneratorImpl.cs

8
com.unity.ml-agents/Runtime/InferenceBrain/GeneratorImpl.cs


{
var info = infoSensorPair.agentInfo;
var pastAction = info.storedVectorActions;
for (var j = 0; j < actionSize; j++)
{
tensorProxy.data[agentIndex, j] = pastAction[j];
if (pastAction != null){
for (var j = 0; j < actionSize; j++)
{
tensorProxy.data[agentIndex, j] = pastAction[j];
}
}
agentIndex++;

正在加载...
取消
保存