SpatioTemporalSegmentation icon indicating copy to clipboard operation
SpatioTemporalSegmentation copied to clipboard

TypeError: 'pybind11_type' object is not iterable

Open sandeepnmenon opened this issue 4 years ago • 3 comments
trafficstars

The following line is giving a syntax error https://github.com/chrischoy/SpatioTemporalSegmentation/blob/4afee296ebe387d9a06fc1b168c4af212a2b4804/models/modules/common.py#L61

File "/home/SandeepMenon/SpatioTemporalSegmentation/main.py", line 28, in from models import load_model, load_wrapper File "/home/SandeepMenon/SpatioTemporalSegmentation/models/init.py", line 1, in import models.resunet as resunet File "/home/SandeepMenon/SpatioTemporalSegmentation/models/resunet.py", line 1, in from models.resnet import ResNetBase, get_norm File "/home/SandeepMenon/SpatioTemporalSegmentation/models/resnet.py", line 6, in from models.modules.common import ConvType, NormType, get_norm, conv, sum_pool File "/home/SandeepMenon/SpatioTemporalSegmentation/models/modules/common.py", line 61, in int_to_region_type = {m.value: m for m in ME.RegionType} TypeError: 'pybind11_type' object is not iterable

Environment details Minkowski Engine : 0.5.4 PyTorch : 1.7.1

sandeepnmenon avatar Jun 22 '21 11:06 sandeepnmenon

It can be replaced with int_to_region_type = {m: ME.RegionType(m) for m in range(3)} @chrischoy Is this fix relevant or is it due to MinkowskiEngine version mismatch.

sandeepnmenon avatar Jun 22 '21 11:06 sandeepnmenon

It can be replaced with int_to_region_type = {m: ME.RegionType(m) for m in range(3)} @chrischoy Is this fix relevant or is it due to MinkowskiEngine version mismatch.

Mostly the version mismatch, could you raise a pr for it? I guess this repository hasn't been updated for so long, and people nowadays using ME v0.5.4 naturally run into these problems...

HaFred avatar Dec 01 '22 07:12 HaFred

I'll raise the PR. Thank you

sandeepnmenon avatar Dec 01 '22 22:12 sandeepnmenon