-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I'm encountering an error while attempting to use newly trained weights with FETCH. The error occurs during the prediction phase and states:
Traceback (most recent call last): File "/home/ankit_linux/fetch_gpu/bin/predict.py", line 4, in <module> __import__('pkg_resources').run_script('fetch==0.2.0', 'predict.py') File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/pkg_resources/__init__.py", line 672, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1472, in run_script exec(code, namespace, namespace) File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/fetch-0.2.0-py3.10.egg/EGG-INFO/scripts/predict.py", line 79, in <module> model = get_model(args.model) File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/fetch-0.2.0-py3.10.egg/fetch/utils.py", line 110, in get_model model.load_weights(weights) File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None File "<__array_function__ internals>", line 180, in transpose File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 660, in transpose return _wrapfunc(a, 'transpose', axes) File "/home/ankit_linux/fetch_gpu/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc return bound(*args, **kwds) ValueError: axes don't match array
Steps to Reproduce:
Ran train.py with our injected data CSV.
Obtained the weights.h5 file and renamed it to match the corresponding model name.
Generated the hash using md5sum.
Updated the hash value in the models.csv file.
Replaced the corresponding weight file in the .keras/models directory.
Ran the model using predict.py.
Encountered the error: "ValueError: axes don't match array".
Injected Data Details:
~1000 narrowband pulses
~300 RFIs
Expected Behavior:
The model should successfully predict on the data without raising an error.
Observed Behavior:
The error "ValueError: axes don't match array" appears, preventing further evaluation.
Environment Details:
OS: Ubuntu 24.04.2 LTS on WSL
Python version: 3.10
CUDA version: 11.8
Additional Context:
I'm unsure if I've missed a step or if this issue stems from compatibility concerns with the trained weights. Any guidance on resolving this would be greatly appreciated.
Please let me know if you require additional information or files for troubleshooting.