Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Tensor.expand_as

a = torch.rand(2, 3)
b = torch.rand(2,2, 3)
print('a:',a)
print('b:',b)
c = a.expand_as(b)
print('c:',c)
Source by discuss.pytorch.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+1 =