Skip to content

Commit

Permalink
Fix UserWarning: Defining your __torch_function__ as a plain method i…
Browse files Browse the repository at this point in the history
…s deprecated and will be an error in future, please define it as a classmethod.
  • Loading branch information
V0XNIHILI committed Mar 28, 2023
1 parent c65f9c1 commit fc9ccc8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/brevitas/quant_tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def training(self):
else:
return None

@classmethod
def __torch_function__(self, func, types, args=(), kwargs=None):
if kwargs is None:
kwargs = {}
Expand Down

0 comments on commit fc9ccc8

Please sign in to comment.