torch2trt icon indicating copy to clipboard operation
torch2trt copied to clipboard

module 'collections' has no attribute 'Sequence'

Open ghost opened this issue 1 year ago • 3 comments

Module torch2trt/converters/interpolate.py throw exception: 'collections' has no attribute 'Sequence' because starting from Python 3.10 the class has been moved to collections.abc

ghost avatar Jun 26 '23 16:06 ghost

I am getting the same error. Have you found a solution?

Shyamsundar1984 avatar Nov 19 '23 11:11 Shyamsundar1984

Edit the line5 of torch2trt/converters/interpolate.py: import collections -----> import collections.abc as collections

guyueyao avatar Dec 09 '23 09:12 guyueyao

Edit the line5 of torch2trt/converters/interpolate.py: import collections -----> import collections.abc as collections

Thank You, it is very useful for me!!!

Ender-William avatar Jan 02 '24 07:01 Ender-William