mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Apply parts of pyupgrade to torch (starting with the safest changes). This PR only does two things: removes the need to inherit from object and removes unused future imports. Pull Request resolved: https://github.com/pytorch/pytorch/pull/94308 Approved by: https://github.com/ezyang, https://github.com/albanD
26 lines
284 B
Python
26 lines
284 B
Python
|
|
|
|
|
|
|
|
|
|
from abc import abstractmethod
|
|
|
|
|
|
class Meter:
|
|
|
|
@abstractmethod
|
|
def __init__(self, **kwargs):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def Reset(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def Add(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def Compute(self):
|
|
pass
|