Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensitivity Analysis error #1

Open
DAVID-Hown opened this issue Nov 5, 2024 · 0 comments
Open

Sensitivity Analysis error #1

DAVID-Hown opened this issue Nov 5, 2024 · 0 comments

Comments

@DAVID-Hown
Copy link

DAVID-Hown commented Nov 5, 2024

Layer 52: Removed 32/128 filters based on criterion 0 and pruned 18432/73728 (25.0%) of the parameters in this convolutional layer. Pruning this layer affects the following layers:
Layer 55: Removed 32/128 input channels and pruned 768/3072 (25.0%) of the parameters in this convolutional layer.

Pruned 19296/6020400 parameters in total. Global sparsity: 0.32%

Model Summary: 263 layers, 6001104 parameters, 57888 gradients
Fusing layers...
IDetect.fuse
Traceback (most recent call last):
File "test.py", line 410, in
r = test(opt.data,
File "test.py", line 68, in test
model = load_pruned_model(weights, pruning_params, criterion, map_location=device)
File "/yolov7-pruning/prune.py", line 210, in load_pruned_model
return pruned_model.float().fuse().eval()
File "/yolov7-pruning/models/yolo.py", line 707, in fuse
m.fuse()
File "/yolov7-pruning/models/yolo.py", line 184, in fuse
self.m[i].bias += torch.matmul(self.m[i].weight.reshape(c1,c2),self.ia[i].implicit.reshape(c2_,c1_)).squeeze(1)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1283, in setattr
self.register_parameter(name, value)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 423, in register_parameter
raise ValueError(
ValueError: Cannot assign non-leaf Tensor to parameter 'bias'. Model parameters must be created explicitly. To express 'bias' as a function of another Tensor, compute the value in the forward() method.

@DAVID-Hown DAVID-Hown changed the title error Sensitivity Analysis error Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant