Skip to content

Commit 5131a66

Browse files
author
Ruo-Ping (Rachel) Dong
authored
Add method documentations (#4553)
1 parent ed24758 commit 5131a66

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ public static bool CompareObservation(ISensor sensor, float[] expected, out stri
6464
return true;
6565
}
6666

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public byte[] GetCompressedObservation()
202202
return outputBytes;
203203
}
204204

205+
/// <inheritdoc/>
205206
public int[] GetCompressedChannelMapping()
206207
{
207208
return m_CompressionMapping;
@@ -224,7 +225,6 @@ internal byte[] CreateEmptyPNG()
224225
return texture2D.EncodeToPNG();
225226
}
226227

227-
228228
/// <summary>
229229
/// Constrct stacked CompressedChannelMapping.
230230
/// </summary>

0 commit comments

Comments
 (0)