L-OBS icon indicating copy to clipboard operation
L-OBS copied to clipboard

bug in prune-weights-ResNet18.py?

Open dalistarh opened this issue 5 years ago • 1 comments

Hi,

I was looking into the ResNet18 pytorch code, and noticed the following sequence:

	if layer_name == 'fc':
		layer_type = 'F'
	else:
		layer_type = 'R'

	if layer_type == 'C':
                [...]

Unless I'm wrong, this means that none of the layers will be treated as Conv for this code. Is this behaviour intended?

Thanks, Dan

dalistarh avatar Aug 15 '19 15:08 dalistarh

Hi @dalistarh ,

Yes, all conv layer is treated as res layer (without bias). For ResNet18 only contain one conv layer and the rest are res, FC. It is a simplicity when I write the code.

csyhhu avatar Aug 16 '19 06:08 csyhhu