-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Like I already mentioned in Issue 13, the demo code seems to crash with an error.
from torchvision.models import resnet50
from flopco import FlopCo
from musco.pytorch import CompressorVBMF, CompressorPR, CompressorManual
model = resnet50(pretrained = True)
model.cuda()
model_stats = FlopCo(model, device = 'cuda')
compressor = CompressorVBMF(model,
model_stats,
ft_every=5,
nglobal_compress_iters=2)
while not compressor.done:
compressor.compression_step()
compressed_model = compressor.compressed_model
~/anaconda3/lib/python3.8/site-packages/numpy/linalg/linalg.py in _raise_linalgerror_svd_nonconvergence(err, flag)
104
105 def _raise_linalgerror_svd_nonconvergence(err, flag):
--> 106 raise LinAlgError("SVD did not converge")
107
108 def _raise_linalgerror_lstsq(err, flag):
LinAlgError: SVD did not converge
or
~/anaconda3/lib/python3.8/site-packages/numpy/lib/function_base.py in asarray_chkfinite(a, dtype, order)
495 a = asarray(a, dtype=dtype, order=order)
496 if a.dtype.char in typecodes['AllFloat'] and not np.isfinite(a).all():
--> 497 raise ValueError(
498 "array must not contain infs or NaNs")
499 return a
ValueError: array must not contain infs or NaNs
The output seems to be random and one of both, if code gets run multiple times.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels