python - 是否可以手动调用 tensorboard smooth 函数?

标签 python tensorflow tensorboard

我有两个数组 X 和 Y。

我可以在 tensorboard 中调用一个函数来平滑吗?

现在我可以在 python 中做一个替代方法,比如: sav_smoooth = savgol_filter(Y, 51, 3) plt.plot(X, Y) 但是我不确定 tensorboard 做的怎么样。有我可以调用的功能吗?

谢谢。

最佳答案

到目前为止我还没有找到手动调用它的方法,但是你可以构造一个类似的函数,

基于此answer , 函数会是这样的

def smooth(scalars, weight):  # Weight between 0 and 1
    last = scalars[0]  # First value in the plot (first timestep)
    smoothed = list()
    for point in scalars:
        smoothed_val = last * weight + (1 - weight) * point  # Calculate smoothed value
        smoothed.append(smoothed_val)                        # Save it
        last = smoothed_val                                  # Anchor the last smoothed value

    return smoothed

关于python - 是否可以手动调用 tensorboard smooth 函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42011419/

相关文章:

python - Python中的任意范围嵌套

python - 无法从 CreateView 重定向

python - 杀死或停止生菜中的python脚本

python - 导入tensorflow时出现ImportError : Could not find 'cudnn64_7.dll' ,

python - 在 tensorboard 中创建日志目录

python - 如何将张量板可视化集成到 tf.Estimator?

python - 如何在设置/检索属性时自动转义属性?

python - TensorFlow - nn.max_pooling 极大地增加了内存使用量

python - 将 MobileNet 与 Tensorflow Federated 结合使用时无法序列化 Protocol Buffer

tensorflow - 如何在 Keras 上向 Tensorboard 添加文本摘要?