浏览代码

Fixing bugs and started integration

/layernorm
vincentpierre 4 年前
当前提交
d583db56
共有 2 个文件被更改,包括 11 次插入10 次删除
  1. 19
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
  2. 2
      com.unity.ml-agents/Runtime/Sensors/BufferSensorComponent.cs

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


{
observationProto.CompressedChannelMapping.AddRange(compressibleSensor.GetCompressedChannelMapping());
}
var dimensionPropertySensor = sensor as IDimensionPropertiesSensor;
if (dimensionPropertySensor != null)
}
// Add the dimension properties if any to the observationProto
var dimensionPropertySensor = sensor as IDimensionPropertiesSensor;
if (dimensionPropertySensor != null)
{
Debug.Log(shape[0] + " " + shape[1]);
var dimensionProperties = dimensionPropertySensor.GetDimensionProperties();
int[] intDimensionProperties = new int[dimensionProperties.Length];
for (int i = 0; i < dimensionProperties.Length; i++)
var dimensionProperties = dimensionPropertySensor.GetDimensionProperties();
int[] intDimensionProperties = new int[dimensionProperties.Length];
for (int i = 0; i < dimensionProperties.Length; i++)
{
observationProto.DimensionProperties.Add((int)dimensionProperties[i]);
}
observationProto.DimensionProperties.Add((int)dimensionProperties[i]);
}
observationProto.Shape.AddRange(shape);
return observationProto;

2
com.unity.ml-agents/Runtime/Sensors/BufferSensorComponent.cs


/// <inheritdoc/>
public override ISensor CreateSensor()
{
m_Sensor = new BufferSensor(ObservableSize, MaxNumObservables);
m_Sensor = new BufferSensor(MaxNumObservables, ObservableSize);
return m_Sensor;
}

正在加载...
取消
保存