Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions com.unity.ml-agents/Runtime/SensorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public static bool CompareObservation(ISensor sensor, float[] expected, out stri
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));
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public byte[] GetCompressedObservation()
return outputBytes;
}

/// <inheritdoc/>
public int[] GetCompressedChannelMapping()
{
return m_CompressionMapping;
Expand All @@ -224,7 +225,6 @@ internal byte[] CreateEmptyPNG()
return texture2D.EncodeToPNG();
}


/// <summary>
/// Constrct stacked CompressedChannelMapping.
/// </summary>
Expand Down