浏览代码

Fixing the meta files

/layernorm
vincentpierre 4 年前
当前提交
549f925a
共有 5 个文件被更改,包括 45 次插入4 次删除
  1. 8
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
  2. 8
      com.unity.ml-agents/Runtime/Sensors/BufferSensor.cs
  3. 11
      com.unity.ml-agents/Runtime/Sensors/BufferSensor.cs.meta
  4. 11
      com.unity.ml-agents/Runtime/Sensors/BufferSensorComponent.cs.meta
  5. 11
      com.unity.ml-agents/Runtime/Sensors/IDimensionPropertiesSensor.cs.meta

8
com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs


var dimensionPropertySensor = sensor as IDimensionPropertiesSensor;
if (dimensionPropertySensor != null)
{
observationProto.DimensionProperties.AddRange(dimensionPropertySensor.GetDimensionProperties());
var dimensionProperties = dimensionPropertySensor.GetDimensionProperties();
int[] intDimensionProperties = new int[dimensionProperties.Length];
for (int i = 0; i < dimensionProperties.Length; i++)
{
intDimensionProperties[i] = (int)dimensionProperties[i];
}
observationProto.DimensionProperties.AddRange(intDimensionProperties);
}
}

8
com.unity.ml-agents/Runtime/Sensors/BufferSensor.cs


using System;
namespace Unity.MLAgents.Sensors
{
public class BufferSensor : ISensor

{
m_MaxNumObs = maxNumberObs;
m_ObsSize = obsSize;
m_ObservationBuffer = new float[m_ObservableSize * m_MaxNumObservables];
m_ObservationBuffer = new float[m_ObsSize * m_MaxNumObs];
m_CurrentNumObservables = 0;
}

/// <inheritdoc/>
public int Write(ObservationWriter writer)
{
for (int i = 0; i < m_ObservableSize * m_MaxNumObservables; i++)
for (int i = 0; i < m_ObsSize * m_MaxNumObs; i++)
return m_ObservableSize * m_MaxNumObservables;
return m_ObsSize * m_MaxNumObs;
}
/// <inheritdoc/>

11
com.unity.ml-agents/Runtime/Sensors/BufferSensor.cs.meta


fileFormatVersion: 2
guid: 034f05c858e684e5498d9a548c9d1fc5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
com.unity.ml-agents/Runtime/Sensors/BufferSensorComponent.cs.meta


fileFormatVersion: 2
guid: dd8012d5925524537b27131fef517017
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
com.unity.ml-agents/Runtime/Sensors/IDimensionPropertiesSensor.cs.meta


fileFormatVersion: 2
guid: 297e9ec12d6de45adbcf6dea1a9de019
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存