tanluren / yolov3-channel-and-layer-pruning

yolov3 yolov4 channel and layer pruning, Knowledge Distillation 层剪枝,通道剪枝,知识蒸馏
Apache License 2.0
1.5k stars 446 forks source link

one of the variables needed for gradient computation has been modified by an inplace operation #66

Open CNSTJiatongLee opened 4 years ago

CNSTJiatongLee commented 4 years ago

one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8, 1024, 13, 13]], which is output 0 of CudnnBatchNormBackward, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

zbyuan commented 4 years ago

https://github.com/tanluren/yolov3-channel-and-layer-pruning/blob/master/models.py#L127 is ok