fbcotter / pytorch_wavelets

Pytorch implementation of 2D Discrete Wavelet (DWT) and Dual Tree Complex Wavelet Transforms (DTCWT) and a DTCWT based ScatterNet
Other
943 stars 146 forks source link

KeyError: 'near_sym_a' #21

Closed ma3252788 closed 3 years ago

ma3252788 commented 3 years ago

Hello, I am trying this code, but the strange thing is that one of my GPUs can be used, but the other one reports an error:

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pytorch_wavelets/dtcwt/coeffs.py", line 20, in _load_from_file
    mat = COEFF_CACHE[basename]
KeyError: 'near_sym_a'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 343, in get_provider
    module = sys.modules[moduleOrReq]
KeyError: 'pytorch_wavelets.dtcwt.data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "t.py", line 3, in <module>
    scat = ScatLayer().cuda()
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pytorch_wavelets/scatternet/layers.py", line 47, in __init__
    h0o, _, h1o, _ = _biort(biort)
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pytorch_wavelets/dtcwt/coeffs.py", line 38, in biort
    return level1(name, compact=True)
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pytorch_wavelets/dtcwt/coeffs.py", line 74, in level1
    return _load_from_file(name, ('h0o', 'g0o', 'h1o', 'g1o'))
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pytorch_wavelets/dtcwt/coeffs.py", line 22, in _load_from_file
    with resource_stream('pytorch_wavelets.dtcwt.data', basename + '.npz') as f:
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in resource_stream
    return get_provider(package_or_requirement).get_resource_stream(
  File "/home/ubuntu/anaconda3/envs/d2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 345, in get_provider
    __import__(moduleOrReq)
ModuleNotFoundError: No module named 'pytorch_wavelets.dtcwt.data'
fbcotter commented 3 years ago

This is quite a weird error. It looks like the data are missing. Could you step me through how to replicate the error? What did you do on your second machine to get to here?