浏览代码

Add method documentations (#4553)

/release_8_branch
GitHub 4 年前
当前提交
1a2f8025
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 10
      com.unity.ml-agents/Runtime/SensorHelper.cs
  2. 2
      com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs

10
com.unity.ml-agents/Runtime/SensorHelper.cs


return true;
}
/// <summary>
/// Generates the observations for the provided sensor, and returns true if they equal the
/// expected values. If they are unequal, errorMessage is also set.
/// This should not generally be used in production code. It is only intended for
/// simplifying unit tests.
/// </summary>
/// <param name="sensor"></param>
/// <param name="expected"></param>
/// <param name="errorMessage"></param>
/// <returns></returns>
public static bool CompareObservation(ISensor sensor, float[,,] expected, out string errorMessage)
{
var tensorShape = new TensorShape(0, expected.GetLength(0), expected.GetLength(1), expected.GetLength(2));

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


return outputBytes;
}
/// <inheritdoc/>
public int[] GetCompressedChannelMapping()
{
return m_CompressionMapping;

var texture2D = new Texture2D(width, height, TextureFormat.RGB24, false);
return texture2D.EncodeToPNG();
}
/// <summary>
/// Constrct stacked CompressedChannelMapping.

正在加载...
取消
保存