Interface ISparseChannelSensor | ML Agents | 1.7.2-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Interface ISparseChannelSensor

    Sensor interface for sparse channel sensor which requires a compressed channel mapping.

    Inherited Members
    ISensor.GetObservationShape()
    ISensor.Write(ObservationWriter)
    ISensor.GetCompressedObservation()
    ISensor.Update()
    ISensor.Reset()
    ISensor.GetCompressionType()
    ISensor.GetName()
    Namespace: Unity.MLAgents.Sensors
    Syntax
    public interface ISparseChannelSensor : ISensor

    Methods

    GetCompressedChannelMapping()

    Returns the mapping of the channels in compressed data to the actual channel after decompression. The mapping is a list of interger index with the same length as the number of output observation layers (channels), including padding if there's any. Each index indicates the actual channel the layer will go into. Layers with the same index will be averaged, and layers with negative index will be dropped. For example, mapping for CameraSensor using grayscale and stacking of two: [0, 0, 0, 1, 1, 1] Mapping for GridSensor of 4 channels and stacking of two: [0, 1, 2, 3, -1, -1, 4, 5, 6, 7, -1, -1]

    Declaration
    int[] GetCompressedChannelMapping()
    Returns
    Type Description
    Int32[]

    Mapping of the compressed data

    Extension Methods

    SensorExtensions.ObservationSize(ISensor)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023