Exemplo n.º 1
0
 /// <summary>
 /// Add a stat value for reporting.
 /// </summary>
 /// <param name="key">The stat name.</param>
 /// <param name="value">
 /// The stat value. You can nest stats in TensorBoard by using "/".
 /// </param>
 /// <param name="aggregationMethod">
 /// How multiple values sent in the same summary window should be treated.
 /// </param>
 public void Add(
     string key,
     float value,
     StatAggregationMethod aggregationMethod = StatAggregationMethod.Average)
 {
     m_Channel.AddStat(key, value, aggregationMethod);
 }
    public void Update()
    {
        scoreText.text = $"Score: {totalScore}";

        // Send stats via SideChannel so that they'll appear in TensorBoard.
        // These values get averaged every summary_frequency steps, so we don't
        // need to send every Update() call.
        if ((Time.frameCount % 100) == 0)
        {
            m_statsSideChannel?.AddStat("TotalScore", totalScore);
        }
    }