docs.unity3d.com
    Show / Hide Table of Contents

    Class ObservationWriter

    Allows sensors to write to both TensorProxy and float arrays/lists.

    Inheritance
    Object
    ObservationWriter
    Namespace: Unity.MLAgents.Sensors
    Syntax
    public class ObservationWriter : object

    Properties

    Item[Int32]

    1D write access at a specified index. Use AddList if possible instead.

    Declaration
    public float this[int index] { set; }
    Parameters
    Type Name Description
    Int32 index

    Index to write to.

    Property Value
    Type Description
    Single

    Item[Int32, Int32, Int32]

    3D write access at the specified height, width, and channel. Only usable with a TensorProxy target.

    Declaration
    public float this[int h, int w, int ch] { set; }
    Parameters
    Type Name Description
    Int32 h
    Int32 w
    Int32 ch
    Property Value
    Type Description
    Single

    Methods

    AddRange(IEnumerable<Single>, Int32)

    Write the range of floats

    Declaration
    public void AddRange(IEnumerable<float> data, int writeOffset = 0)
    Parameters
    Type Name Description
    IEnumerable<Single> data
    Int32 writeOffset

    Optional write offset.

    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