mind icon indicating copy to clipboard operation
mind copied to clipboard

Using datasets of length 100+ can return NaN in prediction

Open D-Nice opened this issue 8 years ago • 4 comments

Trying with varying datasets of 2 inputs, if the total length of the dataset exceeds 100, with normalized inputs of -1.00 to 1.00, the predict method will tend to return NaN. Default htan is being used. Increasing hidden layers and units seems to help in increasing the total length, but still is this to be expected, I would assume that the neural network should be able to come up with at least some sort of prediction after several iterations.

D-Nice avatar May 29 '17 01:05 D-Nice

I'm unable to replicate this issue. Can you show me your training data and network configuration?

stevenmiller888 avatar May 31 '17 21:05 stevenmiller888

Apologies, it seems to have been an issue with the inputs being incorrectly normalized from my end, after I just retried and took a deeper look. So the inputs were always being set to 1. Still, even if all inputs are always a constant number, is this something that should still happen, where it returns NaN? Feel free to close this issue after answering :)

D-Nice avatar Jun 02 '17 21:06 D-Nice

That is not expected. I've been able to replicate with a constant number as the input. I'm not sure what's causing this. Will try to investigate soon.

stevenmiller888 avatar Jun 04 '17 08:06 stevenmiller888

It seems like under certain circumstances some rounding error creeps in and damages everything. I tried network with 20 hidden layers of 20 units, and it's almost always returned same result for any input. Also after different invocations of learning the same data I get different predictions, is it expected behaviour?

stiff avatar Sep 21 '17 09:09 stiff