praneethsv
(Venkata Praneeth Srungarapu)
August 15, 2020, 7:48am
1
Hello,
I have a requirement that my neural network output should produce a floating-point sequence that is monotonically increasing i.e. something like below:
output = [0.01, 0.05, 0.1, 0.2, 0.3, 0.7, 0.9, 1.0]
Is there any way that I can implement this requirement in PyTorch? Assuming I am using RNN based neural network.
vdw
(Chris)
August 15, 2020, 8:31am
2
This requirement in itself doesn’t make much sense. What is the input of your network and what are the predictions?
There’s no need for a neural network to create a sequence of monotonically increasing floats
map outputs to positive domain (e.g. softplus(rnn_output)) and treat them as deltas: outputs=cumsum(deltas, dim=timedim)
praneethsv
(Venkata Praneeth Srungarapu)
August 15, 2020, 3:08pm
4
Hi Alex,
Thanks for your kind reply, Can you explain, What do you mean by treat them as deltas? Please.
differencing, y[t] = y[t-1] + delta, with cumsum you “integrate” deltas back