Open rcervinoucm opened 3 weeks ago
Thanks for reporting @rcervinoucm. I think it would be matter for renaming model
to singlecnn_model
here. Can you please take care of it?
I just checked, I think loaded_model
needs to be renamed to singlecnn_model
.
I have to change loaded_model and model, right?
Only loaded_model
should be enough. The other variable called model
is just there to set the layer to trainable or not. Maybe a more descriptive name would be good for this one (e.g. backbone_layer
or so).
I solved it in the new model API here.
I solved locally and in the branch issue210, haven't made a pull request because I was locally testing. Do you think I should remove the branch and wait until de API deployment?
Describe the bug I am traying to set a weight set as input for a TRN model a TRN model, and I am getting this error:
pd.DataFrame( /home/rcervino/anaconda3/envs/mrkrabs2/lib/python3.10/site-packages/dl1_data_handler/reader.py:818: PerformanceWarning: your performance may suffer as PyTables will pickle object types that it cannot map directly to c-types [inferred_type->mixed-integer,key->block0_items] [items->None] pd.DataFrame( INFO: Number of events loaded: 2810246 INFO:Setting up model: INFO: Constructing model from config. Traceback (most recent call last): File "/home/rcervino/anaconda3/envs/mrkrabs2/bin/ctlearn", line 8, in
sys.exit(main())
File "/home/rcervino/anaconda3/envs/mrkrabs2/lib/python3.10/site-packages/ctlearn/run_model.py", line 691, in main
run_model(config, mode="train", debug=args.debug, log_to_file=args.log_to_file, save_best_only= args.save_best_only)
File "/home/rcervino/anaconda3/envs/mrkrabs2/lib/python3.10/site-packages/ctlearn/run_model.py", line 178, in run_model
backbone, backbone_inputs = backbone_model(data, model_params)
File "/home/rcervino/anaconda3/envs/mrkrabs2/lib/python3.10/site-packages/ctlearn/default_models/single_cnn.py", line 123, in single_cnn_model
return singlecnn_model, network_input
UnboundLocalError: local variable 'singlecnn_model' referenced before assignment
To Reproduce Steps to reproduce the behavior: