Unverified Commit ecb4a9ee authored by lausannel's avatar lausannel Committed by GitHub
Browse files

Change other to other.size() for compatibility (#249)

* change other to other.size() for compatibility

* fix typo
parent 8d05f610
......@@ -9,5 +9,5 @@ def broadcast(src: torch.Tensor, other: torch.Tensor, dim: int):
src = src.unsqueeze(0)
for _ in range(src.dim(), other.dim()):
src = src.unsqueeze(-1)
src = src.expand_as(other)
src = src.expand(other.size())
return src
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment