I have two arrays X and Y.
Is there a function I can call in tensorboard to do the smooth?
Right now I can do an alternative way in python like:
sav_smoooth = savgol_filter(Y, 51, 3)
plt.plot(X, Y)
But I am not sure what's way tensorboard do smooth. Is there a function I can call?
Thanks.
So far I haven't found a way to call it manually, but you can construct a similar function,
based on this answer, the function will be something like
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With