PPPLDeepLearning / plasma-python

PPPL deep learning disruption prediction package
http://tigress-web.princeton.edu/~alexeys/docs-web/html/
79 stars 43 forks source link

Enable batch norm and bidirectional LSTM #27

Closed ASvyatkovskiy closed 6 years ago

ASvyatkovskiy commented 6 years ago

This PR enables small modifications to the model builder:

  1. Add Keras bidirectional wrapper to LSTM
  2. Batch normalization between linear and non-linear layers. Namely, it would work like this:
    pre_rnn_1D = Convolution1D(num_conv_filters//div_fac,size_conv_filters,padding='valid') (pre_rnn_1D)
    if use_batch_norm:  pre_rnn_1D = BatchNormalization()(pre_rnn_1D)
    pre_rnn_1D = Activation('relu')(pre_rnn_1D)

    Both features are disabled by default and can be controlled in the conf.yaml

  3. Add some comments in the code