mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 08:17:45 +01:00
better error raise (#1301)
This commit is contained in:
@@ -198,6 +198,8 @@ class VolumeDensity(nn.Module):
|
||||
class VolumeRadiance(nn.Module):
|
||||
|
||||
def __init__(self, config):
|
||||
import tinycudann as tcnn
|
||||
|
||||
super(VolumeRadiance, self).__init__()
|
||||
self.config = config
|
||||
self.n_dir_dims = 3
|
||||
|
||||
@@ -211,4 +211,4 @@ def build_from_cfg(cfg,
|
||||
return obj_cls(**args)
|
||||
except Exception as e:
|
||||
# Normal TypeError does not print class name.
|
||||
raise type(e)(f'{obj_cls.__name__}: {e}')
|
||||
raise type(e)(f'{obj_cls.__name__}: {e}') from e
|
||||
|
||||
Reference in New Issue
Block a user