RuntimeError: stack expects a non-empty TensorList
abdou385 opened this issue · comments
abdou385 commented
first of all I thank , I tried to train model with pytorch but I got the following error: RuntimeError: stack expects a non-empty TensorList .I am trying to model a extract features point cloud using deep learning in pytorch. I get the following error . Could anyone help on this? * Thanks!
def kmeansConvThreader(modules, input_tensor):
list1_append = []
list2_append = []
list3_append = []
threads = []
for i, t in enumerate(input_tensor):
threads.append(
Thread(target=kmeansAppender, args=(modules[i], t, list1_append, list2_append, list3_append, i)))
[t.start() for t in threads]
[t.join() for t in threads]
list1_append.sort()
list2_append.sort()
list3_append.sort()
list1_append = list(map(lambda x: x[1], list1_append))
list2_append = list(map(lambda x: x[1], list2_append))
list3_append = list(map(lambda x: x[1], list3_append))
return torch.stack(list1_append), torch.stack(list2_append), torch.stack(list3_append)
File ~\Desktop\Forum\unit.py:611, in kmeansConvThreader(modules, input_tensor)
609 list2_append = list(map(lambda x: x[1], list2_append))
610 list3_append = list(map(lambda x: x[1], list3_append))
--> 611 return torch.stack(list1_append), torch.stack(list2_append), torch.stack(list3_append)
RuntimeError: stack expects a non-empty TensorList
Thanks for your help
abdou385 commented
thank you mdouz, but I don't know where this error comes from?
Le lun. 2 janv. 2023 à 12:39, Matthijs Douze ***@***.***> a
écrit :
… Closed #2635 <#2635> as
completed.
—
Reply to this email directly, view it on GitHub
<#2635 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4C3FTISEQ2NZ3XVSGZ3UV3WQK45VANCNFSM6AAAAAATELWPOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>