inputs = torch.randn(124, 3, 32, 32)
input1 =torch.randn(111600, 3, 32, 32)
st= time.time()
input1=torch.cat((input1,inputs),0)
print(time.time() - st)
I am trying to concat huge tensors to load it via a dataloader object. It takes about 200 sec to concat them. Is there an efficient way?
jpeg729
(jpeg729)
2
I would be surprised if torch.cat was not already heavily optimised.
smth
3
It takes 1.0 second for me on my MacBook Pro.
Can you tell us how you installed PyTorch and what OS you are running on?
I am running Pytorch 0.3.1.post2
2015 Macbook Pro— macOS Sierra…
I also tried this approach
inputs = torch.randn(124, 3, 32, 32)
input1 =torch.randn(124, 3, 32, 32)
target1 = targets
for i in range(1,100):
input1=torch.cat((input1,inputs),0)
print input1