|
|
|
|
|
|
// If there are not enough Visual Observation Input compared to what the
|
|
|
|
// sensors expect.
|
|
|
|
var visObsIndex = 0; |
|
|
|
var varLenIndex = 0; |
|
|
|
for (var sensorIndex = 0; sensorIndex < sensorComponents.Length; sensorIndex++) |
|
|
|
{ |
|
|
|
var sensor = sensorComponents[sensorIndex]; |
|
|
|
|
|
|
if (sensor.GetObservationShape().Length == 2) |
|
|
|
{ |
|
|
|
if (!tensorsNames.Contains( |
|
|
|
TensorNames.ObservationPlaceholderPrefix + sensorIndex)) |
|
|
|
TensorNames.ObservationPlaceholderPrefix + varLenIndex)) |
|
|
|
$"for sensor component {sensorIndex} ({sensor.GetType().Name})."); |
|
|
|
$"for sensor component {varLenIndex} ({sensor.GetType().Name})."); |
|
|
|
varLenIndex++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var visObsIndex = 0; |
|
|
|
var varLenIndex = 0; |
|
|
|
for (var sensorIndex = 0; sensorIndex < sensorComponents.Length; sensorIndex++) |
|
|
|
{ |
|
|
|
var sensorComponent = sensorComponents[sensorIndex]; |
|
|
|
|
|
|
} |
|
|
|
if (sensorComponent.GetObservationShape().Length == 2) |
|
|
|
{ |
|
|
|
tensorTester[TensorNames.ObservationPlaceholderPrefix + sensorIndex] = |
|
|
|
tensorTester[TensorNames.ObservationPlaceholderPrefix + varLenIndex] = |
|
|
|
varLenIndex++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|