Hello Soumith,
I have a related question regarding differentiability of some functions.
Is there any differentiable way to create a tensor of the size that is the value of some other tensor? In code:
size = torch.IntTensor([[2, 3]])
print(size)
# One would expect that something like this:
#   tensor = torch.IntTensor(size)
# would work, but actually it is this:
width = size[0, 0]
height = size[0, 1]
tensor = torch.FloatTensor(height, width)
print(tensor)

Is it even theoretically possible?