Skip to content

Commit

Permalink
Feat (quant_tensor): support for dim() and ndim (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 authored Apr 30, 2024
1 parent cdc1811 commit 33df0c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/brevitas/quant_tensor/int_quant_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ def permute(self, *args, **kwargs):
def size(self, *args, **kwargs):
return self.value.size(*args, **kwargs)

@property
def ndim(self):
return self.value.ndim

def dim(self):
return self.value.dim()

@property
def shape(self):
return self.value.shape
Expand Down

0 comments on commit 33df0c0

Please sign in to comment.