Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def wrapper(self, *args, **kwargs):
with tf.device(self.tensor.device):
out = f(self, *args, **kwargs)
return out