Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ smooth
Function
smooth
rl2/atari/dqn_tf.py:344–351 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
342
343
344
def
smooth(x):
345
# last 100
346
n = len(x)
347
y = np.zeros(n)
348
for
i in range(n):
349
start = max(0, i - 99)
350
y[i] = float(x[start:(i+1)].sum()) / (i - start + 1)
351
return
y
352
353
354
if
__name__ ==
'__main__'
:
Callers
1
dqn_tf.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected