anonymous No title
No License Python
2019年05月27日
Copy Clone
# wrong
class MyDataParallel(nn.DataParallel):
    def __getattr__(self, name):
        return getattr(self.module, name)

# correct
class MyDataParallel(DataParallel):
    def __getattr__(self, name):
        if name is not 'module':
            try:
                return getattr(self.module, name)
            except AttributeError:
                pass
        print(name)
        return super(nn.DataParallel, self).__getattr__(name)
# wrong
class MyDataParallel(nn.DataParallel):
    def __getattr__(self, name):
        return getattr(self.module, name)

# correct
class MyDataParallel(DataParallel):
    def __getattr__(self, name):
        if name is not 'module':
            try:
                return getattr(self.module, name)
            except AttributeError:
                pass
        print(name)
        return super(nn.DataParallel, self).__getattr__(name)
anonymous
Anonymous
2020年09月14日
http://onlinecasinouse.com/# casino blackjack http://onlinecasinouse.com/# - free casino games <a href="http://onlinecasinouse.com/# ">online casino gambling </a>
Output