philipperemy / keras-tcn

Keras Temporal Convolutional Network.
MIT License
1.89k stars 454 forks source link

First example gives away the answer by inserting the result into the x_train dataset #183

Closed Caedin closed 3 years ago

Caedin commented 3 years ago

Describe the bug First example in the documentation gives away the answer by inserting the result into the x_train dataset

I got perfect prediction results with just a few trains on my first run though.

x_train[pos_indices, 0] = 1.0

Removing this line creates a training curve that makes sense.

Following the example as written:

image

After removing the offending line:

image

philipperemy commented 3 years ago

Yes I think it was done on purpose to make sure the TCN can go back "in time" to the beginning of the sequence to solve the problem.

philipperemy commented 3 years ago

If we remove this line the network will not be able to solve the task.

philipperemy commented 3 years ago

I've updated the README to clarify it: https://github.com/philipperemy/keras-tcn/blob/master/README.md

Thanks for reporting :)