fantomas 发表于 2018-10-13 10:42:50

How to actually predict ONE parameter with Keras GRU on multi parameter weath...

After training the GRU architecture in the Keras book (F. Chollet) on the Jena weather dataset (chapter #6), I am having difficulties understanding the prediction phase:The last layer - Dense with no activation - outputs as expected, a stream of numbers: Dimensions: Num of rows X 1. I guess these are supposed to be the predictions, but it looks like a probability of ALL the 14 parameters. Why only ONE prediction on the 14 parameters ?Problem is the input is num rows X num cols (14 parameters) and the predictions output cannot be reshaped into a 14 columns array - such as the weather data set contains.Aren't the predictions supposed to have the same number of columns as the input, in the Jena Weather time sequence problem ?If the predictions are on ALL 14 parameters and they have been strained thru a Dense layer with ONE unit - then this predictions' "stream" should be able to be reshaped back to num rows X num cols ?Answers
Please refer to the define of generator function:samples[j = data[indicestargets[j = data[rows[j + delay][1The target is the second column in the data, which should be the '"T (degC)"'. So this model predicts the temperature in Celsius degree.Regarding to the last Dense layer, it has not activation function. So it just works as the simple linear regression model. The output is just summary of the output of previous layer multiple layer weights.
页: [1]
查看完整版本: How to actually predict ONE parameter with Keras GRU on multi parameter weath...