|
|
|
|
|
|
|
|
|
|
namespace MLAgents.Tests |
|
|
|
{ |
|
|
|
|
|
|
|
public class RenderTextureSensorTest |
|
|
|
public class RenderTextureSensorTests |
|
|
|
{ |
|
|
|
[Test] |
|
|
|
public void TestRenderTextureSensor() |
|
|
|
|
|
|
var writeAdapter = new WriteAdapter(); |
|
|
|
var obs = sensor.GetObservationProto(writeAdapter); |
|
|
|
|
|
|
|
Assert.AreEqual((int) compression, (int) obs.CompressionType); |
|
|
|
Assert.AreEqual((int)compression, (int)obs.CompressionType); |
|
|
|
var expectedShape = new[] { height, width, grayscale ? 1 : 3 }; |
|
|
|
Assert.AreEqual(expectedShape, obs.Shape); |
|
|
|
} |
|
|
|