nmheim / torsk

An echo state network (ESN) for video prediction
10 stars 5 forks source link

Hyper-parameter optimization 2.0 #22

Closed nmheim closed 5 years ago

nmheim commented 5 years ago

Trying to resolve #20

The hyper-parameter optimization will create a folder structure parameter. If the hyper-params are spectral_radius, and weight_init it will look like this:

model-spectral_radius:1.5-weight_init:1.0/
     - params.json
     - model.pth
     - train_data.nc
     - run-domain:{domain}-transient_length:{transient_length}/
     - ...

After the untrained model.pth has been created all following steps are deterministic as the only source of randomness is the creation of the model matrices. The train_data.nc of the run folders will contain the used inputs/labels and created states which can now be generated.

Next the output layer can be optimized. For some (level-two) hyper-parameters the optimization of the states that are created by a given input sequence are invariant and can be reused. This is reflected in another sub directory of the folder structure:

run-transient_length:{transient_length}/
    - pinv/
    - tik{tikhonov_beta}

These subdirectories will contain pinv and tik folders. They contain the now trained models and the corresponding predictions. Additionally, the params.json in which only the parameters defined in the parent paths are updated accordingly.

pinv/
    - pred_data.nc
    - model.pth
    - params.json
nmheim commented 5 years ago

what do you think @jamesavery ?