浏览代码

update timer strings (#3518)

/asymm-envs
GitHub 5 年前
当前提交
d10bfae1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      com.unity.ml-agents/Runtime/Sensor/RenderTextureSensor.cs

4
com.unity.ml-agents/Runtime/Sensor/RenderTextureSensor.cs


/// <inheritdoc/>
public byte[] GetCompressedObservation()
{
using (TimerStack.Instance.Scoped("RenderTexSensor.GetCompressedObservation"))
using (TimerStack.Instance.Scoped("RenderTextureSensor.GetCompressedObservation"))
{
var texture = ObservationToTexture(m_RenderTexture);
// TODO support more types here, e.g. JPG

/// <inheritdoc/>
public int Write(WriteAdapter adapter)
{
using (TimerStack.Instance.Scoped("RenderTexSensor.GetCompressedObservation"))
using (TimerStack.Instance.Scoped("RenderTextureSensor.Write"))
{
var texture = ObservationToTexture(m_RenderTexture);
var numWritten = Utilities.TextureToTensorProxy(texture, adapter, m_Grayscale);

正在加载...
取消
保存