thomaskuestner / CNNArt

Automatic and reference-free MR artifact detection
Apache License 2.0
25 stars 17 forks source link

model name mismatch when predicting #31

Closed TokenJan closed 6 years ago

TokenJan commented 6 years ago

when performing predicting, following code will be invoked in cnn_main.py

cnnModel.fPredict(dData['X_test'], dData['y_test'], dData['model_name'], sOutPath, dData['patchSize'], iBatchSize[0])

However, there is no model_name in param.yml

Beside, the trained weights are stored like testout4040_lr_0.05_bs_128_weights.h5, testout4040_lr_0.05_bs_128.mat and testout4040_lr_0.05_bs_128_json, while the weights are loaded in motion_all_CNN2D.py as follows:

def fPredict(X_test, y_test, model_name, sOutPath, patchSize, batchSize): 
    weight_name = model_name[0] + '_weights.h5'
    model_json = model_name[0] + '_json'
    model_all = model_name[0] + '_model.h5'

How can we adapt these changes?

thomaskuestner commented 6 years ago

fixed with f8d5bfba1fb06e6960325a31d2db8594c16fcbed closed