mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-31 16:40:41 +00:00
[fx] added ndim property to proxy (#1253)
This commit is contained in:
@@ -57,6 +57,10 @@ class ColoProxy(Proxy):
|
||||
self._assert_meta_data_is_tensor()
|
||||
return self.meta_data.shape
|
||||
|
||||
@property
|
||||
def ndim(self):
|
||||
return self.dim()
|
||||
|
||||
def dim(self):
|
||||
self._assert_meta_data_is_tensor()
|
||||
return self.meta_data.dim()
|
||||
|
Reference in New Issue
Block a user