when I run the inference code ,it has an error as followed
waveglow_path = '/home/zhonghuihang/tacotron2-master/waveglow_256channels_universal_v5.pt'
waveglow = torch.load(waveglow_path)['model']
waveglow.cuda().eval().half()
for k in waveglow.convinv:
k.float()
denoiser = Denoiser(waveglow)
InvalidArgumentsError Traceback (most recent call last)
/tmp/ipykernel_1534266/1318601042.py in
1 waveglow_path = '/home/zhonghuihang/tacotron2-master/waveglow_256channels_universal_v5.pt'
----> 2 waveglow = torch.load(waveglow_path)['model']
3 waveglow.cuda().eval().half()
4 for k in waveglow.convinv:
5 k.float()
~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/serialization.py in load(f, map_location, pickle_module, weights_only, **pickle_load_args)
~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/serialization.py in find_class(self, mod_name, name)
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/init.py in
28 extend_all(functions)
29
---> 30 from .wgr import * # For backwards compatibility. Avoid showing this import in docs.
31
32 from . import wgr
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/init.py in
13 # limitations under the License.
14
---> 15 from glow.wgr.ridge_reduction import
16 from glow.wgr.ridge_regression import
17 from glow.wgr.logistic_ridge_regression import *
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/ridge_reduction.py in
13 # limitations under the License.
14
---> 15 from .ridge_udfs import *
16 from .model_functions import _is_binary, _prepare_covariates, _prepare_labels_and_warn, _check_model
17 from nptyping import Float, NDArray
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/ridge_udfs.py in
13 # limitations under the License.
14
---> 15 from glow.wgr.model_functions import *
16 from nptyping import Float
17 import pandas as pd
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/model_functions.py in
108 # @typechecked -- typeguard does not support numpy array
109 def assemble_block(n_rows: Int, n_cols: Int, pdf: pd.DataFrame, cov_matrix: NDArray[(Any, Any),
--> 110 Float],
111 row_mask: NDArray[Any]) -> NDArray[Float]:
112 """
~/miniconda3/envs/torch/lib/python3.7/site-packages/nptyping/base_meta_classes.py in getitem(cls, item)
136 raise NPTypingError(f"Type nptyping.{cls} is already parameterized.")
137
--> 138 args = cls._get_item(item)
139 additional_values = cls._get_additional_values(item)
140 assert hasattr(cls, "args"), "A SubscriptableMeta must have args."
when I run the inference code ,it has an error as followed
waveglow_path = '/home/zhonghuihang/tacotron2-master/waveglow_256channels_universal_v5.pt' waveglow = torch.load(waveglow_path)['model'] waveglow.cuda().eval().half() for k in waveglow.convinv: k.float() denoiser = Denoiser(waveglow)
InvalidArgumentsError Traceback (most recent call last) /tmp/ipykernel_1534266/1318601042.py in
1 waveglow_path = '/home/zhonghuihang/tacotron2-master/waveglow_256channels_universal_v5.pt'
----> 2 waveglow = torch.load(waveglow_path)['model']
3 waveglow.cuda().eval().half()
4 for k in waveglow.convinv:
5 k.float()
~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/serialization.py in load(f, map_location, pickle_module, weights_only, **pickle_load_args)
~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/serialization.py in find_class(self, mod_name, name)
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/init.py in
28 extend_all(functions)
29
---> 30 from .wgr import * # For backwards compatibility. Avoid showing this import in docs.
31
32 from . import wgr
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/init.py in
13 # limitations under the License.
14
---> 15 from glow.wgr.ridge_reduction import
16 from glow.wgr.ridge_regression import
17 from glow.wgr.logistic_ridge_regression import *
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/ridge_reduction.py in
13 # limitations under the License.
14
---> 15 from .ridge_udfs import *
16 from .model_functions import _is_binary, _prepare_covariates, _prepare_labels_and_warn, _check_model
17 from nptyping import Float, NDArray
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/ridge_udfs.py in
13 # limitations under the License.
14
---> 15 from glow.wgr.model_functions import *
16 from nptyping import Float
17 import pandas as pd
~/miniconda3/envs/torch/lib/python3.7/site-packages/glow/wgr/model_functions.py in
108 # @typechecked -- typeguard does not support numpy array
109 def assemble_block(n_rows: Int, n_cols: Int, pdf: pd.DataFrame, cov_matrix: NDArray[(Any, Any),
--> 110 Float],
111 row_mask: NDArray[Any]) -> NDArray[Float]:
112 """
~/miniconda3/envs/torch/lib/python3.7/site-packages/nptyping/base_meta_classes.py in getitem(cls, item) 136 raise NPTypingError(f"Type nptyping.{cls} is already parameterized.") 137 --> 138 args = cls._get_item(item) 139 additional_values = cls._get_additional_values(item) 140 assert hasattr(cls, "args"), "A SubscriptableMeta must have args."
~/miniconda3/envs/torch/lib/python3.7/site-packages/nptyping/ndarray.py in _get_item(cls, item) 67 def _get_item(cls, item: Any) -> Tuple[Any, ...]: 68 cls._check_item(item) ---> 69 shape, dtype = cls._get_from_tuple(item) 70 return shape, dtype 71
~/miniconda3/envs/torch/lib/python3.7/site-packages/nptyping/ndarray.py in _get_from_tuple(cls, item) 108 def _get_from_tuple(cls, item: Tuple[Any, ...]) -> Tuple[Shape, DType]: 109 # Return the Shape Expression and DType from a tuple. --> 110 shape = cls._get_shape(item[0]) 111 dtype = cls._get_dtype(item[1]) 112 return shape, dtype
~/miniconda3/envs/torch/lib/python3.7/site-packages/nptyping/ndarray.py in _get_shape(cls, dtype_candidate) 122 else: 123 raise InvalidArgumentsError( --> 124 f"Unexpected argument '{dtype_candidate}', expecting" 125 " Shape[]"
126 " or Literal[]"
InvalidArgumentsError: Unexpected argument '(typing.Any, typing.Any)', expecting Shape[] or Literal[] or typing.Any.