You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could not load weights for finetune (likely because you are finetuning a previously finetuned network). Attempting to finetune from a full finetune model file.
#124
Closed
yuan0821 opened this issue
Sep 15, 2022
· 1 comment
Hi.
I try to use a pre-trained 3 camera weights.:[https://www.dropbox.com/s/2fama0q45sdzwfj/weights_multigpu.30-0.00002.hdf5?dl=0] to finetune our data. I have 150 frames hand-labeled COM file, trained COM from scratch, and completed com-predict.
Now I performed dannce-train with 30-frames hand labels and trained from finetuning network using pre-trained 3 camera weight. the weight loading error occurs, could you please help to fix it? Thank you. dannce_config_907.txt io.txt
`Correcting mismatch in layer name, model: image_input, weights: input_1
Could not load weights for finetune (likely because you are finetuning a previously finetuned network). Attempting to finetune from a full finetune model file.
Traceback (most recent call last):
File "f:\dannce\dannce\interface.py", line 1120, in dannce_train
*fargs
File "f:\dannce\dannce\engine\nets.py", line 1129, in finetune_AVG
model = renameLayers(model, weightspath)
File "f:\dannce\dannce\engine\nets.py", line 1348, in renameLayers
model.load_weights(weightspath, by_name=True)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\tensorflow\python\keras\engine\training.py", line 2319, in load_weights
f, self.layers, skip_mismatch=skip_mismatch)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py", line 768, in load_weights_from_hdf5_group_by_name
layer, weight_values, original_keras_version, original_backend)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py", line 404, in preprocess_weights_for_loading
weights[0] = np.transpose(weights[0], (3, 2, 0, 1))
File "<array_function internals>", line 6, in transpose
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\numpy\core\fromnumeric.py", line 653, in transpose
return _wrapfunc(a, 'transpose', axes)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\numpy\core\fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: axes don't match array
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Anaconda3_202111\envs\dannce\Scripts\dannce-train-script.py", line 33, in
sys.exit(load_entry_point('dannce', 'console_scripts', 'dannce-train')())
File "f:\dannce\dannce\cli.py", line 66, in dannce_train_cli
dannce_train(params)
File "f:\dannce\dannce\interface.py", line 1126, in dannce_train
*fargs
File "f:\dannce\dannce\engine\nets.py", line 1205, in finetune_fullmodel_AVG
for layer in model.layers[1].layers:
AttributeError: 'Conv3D' object has no attribute 'layers'`
The text was updated successfully, but these errors were encountered:
Hi.
I try to use a pre-trained 3 camera weights.:[https://www.dropbox.com/s/2fama0q45sdzwfj/weights_multigpu.30-0.00002.hdf5?dl=0] to finetune our data. I have 150 frames hand-labeled COM file, trained COM from scratch, and completed com-predict.
Now I performed dannce-train with 30-frames hand labels and trained from finetuning network using pre-trained 3 camera weight. the weight loading error occurs, could you please help to fix it? Thank you.
dannce_config_907.txt
io.txt
`Correcting mismatch in layer name, model: image_input, weights: input_1
Could not load weights for finetune (likely because you are finetuning a previously finetuned network). Attempting to finetune from a full finetune model file.
Traceback (most recent call last):
File "f:\dannce\dannce\interface.py", line 1120, in dannce_train
*fargs
File "f:\dannce\dannce\engine\nets.py", line 1129, in finetune_AVG
model = renameLayers(model, weightspath)
File "f:\dannce\dannce\engine\nets.py", line 1348, in renameLayers
model.load_weights(weightspath, by_name=True)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\tensorflow\python\keras\engine\training.py", line 2319, in load_weights
f, self.layers, skip_mismatch=skip_mismatch)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py", line 768, in load_weights_from_hdf5_group_by_name
layer, weight_values, original_keras_version, original_backend)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py", line 404, in preprocess_weights_for_loading
weights[0] = np.transpose(weights[0], (3, 2, 0, 1))
File "<array_function internals>", line 6, in transpose
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\numpy\core\fromnumeric.py", line 653, in transpose
return _wrapfunc(a, 'transpose', axes)
File "E:\Anaconda3_202111\envs\dannce\lib\site-packages\numpy\core\fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: axes don't match array
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Anaconda3_202111\envs\dannce\Scripts\dannce-train-script.py", line 33, in
sys.exit(load_entry_point('dannce', 'console_scripts', 'dannce-train')())
File "f:\dannce\dannce\cli.py", line 66, in dannce_train_cli
dannce_train(params)
File "f:\dannce\dannce\interface.py", line 1126, in dannce_train
*fargs
File "f:\dannce\dannce\engine\nets.py", line 1205, in finetune_fullmodel_AVG
for layer in model.layers[1].layers:
AttributeError: 'Conv3D' object has no attribute 'layers'`
The text was updated successfully, but these errors were encountered: