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
8 changes: 8 additions & 0 deletions com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Minor Changes
#### com.unity.ml-agents (C#)
- Fixed tensor indexing to use correct CHW layout (#6239)

#### ml-agents / ml-agents-envs
- Fixed CUDA/CPU mismatch in threaded training (#6245)

## [4.0.0] - 2025-08-15
### Major Changes
#### com.unity.ml-agents (C#)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ public void TestVisualObservations(bool fullBoard)
{
expectedObs = new float[]
{
1, 0, /**/ 0, 1, /**/ 1, 0,
1, 0, /**/ 1, 0, /**/ 1, 0,
1, 0, /**/ 1, 0, /**/ 1, 0,
// NCHW layout: [channel0_all_positions, channel1_all_positions]
1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0
};

expectedObs3D = new float[,,]
Expand All @@ -158,9 +157,8 @@ public void TestVisualObservations(bool fullBoard)
{
expectedObs = new float[]
{
1, 0, /* 0 */ 0, 1, /* 1 */ 0, 0, /* empty */
1, 0, /* 0 */ 1, 0, /* 0 */ 0, 0, /* empty */
0, 0, /* empty */ 0, 0, /* empty */ 0, 0, /* empty */
// NCHW layout: [channel0_all_positions, channel1_all_positions]
1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
};

expectedObs3D = new float[,,]
Expand Down Expand Up @@ -201,9 +199,8 @@ public void TestVisualObservationsSpecial()

var expectedObs = new float[]
{
1, 0, /* (0) */ 0, 1, /* (1) */ 1, 0, /* (0) */
1, 0, /* (0) */ 1, 0, /* (0) */ 1, 0, /* (0) */
1, 0, /* (0) */ 1, 0, /* (0) */ 1, 0, /* (0) */
// NCHW layout: [channel0_all_positions, channel1_all_positions]
1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0
};
SensorTestHelper.CompareObservation(cellSensor, expectedObs);

Expand Down Expand Up @@ -238,9 +235,8 @@ public void TestVisualObservationsSpecial()

var expectedObs = new float[]
{
1, 0, 0, /* (0) */ 1, 0, 0, /* (1) */ 1, 0, 0, /* (0) */
0, 0, 1, /* (2) */ 1, 0, 0, /* (0) */ 1, 0, 0, /* (0) */
1, 0, 0, /* (0) */ 0, 1, 0, /* (1) */ 1, 0, 0, /* (0) */
// NCHW layout: [channel0_all_positions, channel1_all_positions, channel2_all_positions]
1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
};
SensorTestHelper.CompareObservation(specialSensor, expectedObs);

Expand Down