Skip to content

Commit

Permalink
fix: remove assertions from torch.Tensor frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Armstrong committed Sep 1, 2024
1 parent 9201b7d commit c51862a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ivy/functional/frontends/torch/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,6 @@ def logit(self):

@with_unsupported_dtypes({"2.2 and below": ("bfloat16", "uint16")}, "torch")
def copy_(self, other, non_blocking=False):
ivy.utils.assertions.check_one_way_broadcastable(
self.ivy_array.shape, torch_frontend.tensor(other).ivy_array.shape
)
self._ivy_array = torch_frontend.tensor(other).ivy_array
return self

Expand Down Expand Up @@ -1963,7 +1960,6 @@ def backward(self, gradient=None, retain_graph=None, create_graph=False):
if gradient is None and int(torch_frontend.numel(self)) > 1:
raise RuntimeError("grad can be implicitly created only for scalar outputs")
if self.grad_fn is None and self._grads is None:
assert self.shape == gradient.shape, "Mismatch in shape"
self._grads = gradient
return
_grad_list = self.grad_fn(
Expand Down

0 comments on commit c51862a

Please sign in to comment.