Closed mitometa closed 1 year ago
tested in ubuntu with
pytorch-ignite 0.4.10 torch 1.13.0 torchsummary 1.5.1 scikit-learn 1.1.3
tested in mac with:
pytorch-ignite 0.4.10 torch 1.12.1 torchsummary 1.5.1 scikit-learn 1.0.2
The errors are robust to be repeated in both systems.
$ nano +617 deepClassifier.py
new_weights = torch.load(weight_path)
new_weights.pop("batns_for_stft.1.bias")
new_weights.pop("batns_for_stft.1.weight")
new_weights.pop("batns_for_stft.1.running_mean")
new_weights.pop("batns_for_stft.1.running_var")
new_weights.pop("batns_for_stft.2.bias")
new_weights.pop("batns_for_stft.2.weight")
new_weights.pop("batns_for_stft.2.running_mean")
new_weights.pop("batns_for_stft.2.running_var")
new_weights.pop("batns_for_stft.3.bias")
new_weights.pop("batns_for_stft.3.weight")
new_weights.pop("batns_for_stft.3.running_mean")
new_weights.pop("batns_for_stft.3.running_var")
new_weights.pop("convs_for_stft.0.weight")
new_weights.pop("convs_for_stft.1.weight")
new_weights.pop("convs_for_stft.2.weight")
new_weights.pop("convs_for_stft.3.weight")
new_weights.pop("batn_combined.weight")
new_weights.pop("batn_combined.bias")
new_weights.pop("batn_combined.running_mean")
new_weights.pop("batn_combined.running_var")
new_weights.pop("final_fc_no_lstm.weight")
new_weights.pop("fulc_combined_lstm.weight")
self.model.load_state_dict(new_weights, strict=False)
Thank you for sharing the source codes!
I have tried to run demo, but failed with size mismatch errors for torch in both ubuntu and mac osx systems.
$ python app.py m
output: