ctlearn-project / ctlearn

Deep Learning for IACT Event Reconstruction
BSD 3-Clause "New" or "Revised" License
52 stars 43 forks source link

Give error message when loading a model with an invalid data mode #126

Closed TjarkMiener closed 2 years ago

TjarkMiener commented 4 years ago

Hi Ari, following up on the discussion we had during our last CTLearn call about the crash with the cnn_rnn model, I'm getting this dimension error ValueError: Dimension must be 4 but is 5 for 'transpose' (op: 'Transpose') with input shapes: [?,114,114,1], [5].

tf.transpose is causing this crash in cnn_rnn.py:

File "/home/tjark/multitask/fresh/ctlearn/ctlearn/default_models/cnn_rnn.py", line 23, in cnn_rnn_model
    telescope_data = tf.transpose(telescope_data, perm=[1, 0, 2, 3, 4])

Was there a change in the DL1Reader ('stereo' mode) that could cause this dimension mismatch?

TjarkMiener commented 4 years ago

The crash occur, when selecting the cnnrnn model and 'mono' mode in the DL1Reader. The 'stereo' mode should be selected with the cnnrnn model. We could add some checks so that CTLearn is crashing with clear error messages, when the configurations are not valid.

nikita-0209 commented 4 years ago

Hi. I am a novice. Is this a good issue to begin with?

TjarkMiener commented 2 years ago

Redundant due to the use of default models.