小编Nub*_*eet的帖子

Tensorflow:如何实现累积最大值?

我正在尝试使用以下格式的代码为我的损失函数实现最大回撤:

x = cumulative product of returns tensor
z = cumulative max of x
g = minimum of z / x
Run Code Online (Sandbox Code Playgroud)

但我对如何计算 Tensorflow 中的累积最大值感到困惑x。例如:给定一个数组[0,2,5,3,8,1,7],该数组的累积最大值将为[0,2,5,5,8,8,8]。它创建一个具有迄今为止最大值的数组。

任何提示将非常感谢。

python vectorization tensorflow

3
推荐指数
1
解决办法
1904
查看次数

标签 统计

python ×1

tensorflow ×1

vectorization ×1