简体   繁体   中英

Keras LSTM Binary Classification Output

I am doing binary classification for a time series with keras LSTM. How could I extract the final output from the model? By this I mean, how can I get a list containing zero and one values from the final model?

You should attach right after a LSTM layer a Dense layer with as much neurons as you consider (that depends upon the LSTM output itself), and on top of that one add a final Dense classification layer with a single neuron, that'd be the binary output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM