Closed turmeric-blend closed 3 years ago
@turmeric-blend you can try y_true = K.print_tensor(y_true)
it does not output anything :/
As in this post :https://stackoverflow.com/questions/55022966/keras-custom-loss-function-not-printing-value-of-tensor
,
you just need add this line in sharpe_ratio_loss
function, and run main.py
file like my instruction, it will automatically print the value of y_true
tensor when using sharpe_ratio_loss
func.
hi, thanks for your work. I would like to print the output tensors to understand the code better, but it does not print out as expected. For example if I
print(y_true)
from utils.py:it returns
Tensor("activation_1_target:0", shape=(?, ?), dtype=float32)
instead of a tensor with values. Is there a way to solve this?