ByungKwanLee / Causal-Unsupervised-Segmentation

Official PyTorch Implementation code for realizing the technical part of Causal Unsupervised Semantic sEgmentation (CAUSE) to improve performance of unsupervised semantic segmentation. (Under Review)
8 stars 1 forks source link

fail to init the model #3

Open maxbeyond opened 10 months ago

maxbeyond commented 10 months ago

When I try to run, I get this error. DINOMAEVisionTransformer model fails to init. Any suggestions? Thanks.

./run ------------------Configurations------------------ epoch: 1 distributed: False load_segment: False load_cluster: False train_resolution: 320 test_resolution: 320 batch_size: 16 num_workers: 4 data_dir: /home/root/moredata/segment/fast/ dataset: cocostuff27 ckpt: checkpoint/dino_vit_base_8.pth gpu: 0 port: 1243 grid: True num_codebook: 2048 reduced_dim: 90 projection_dim: 2048 dim: 768

Traceback (most recent call last): File "/home/root/code/Causal-Unsupervised-Segmentation/train_mediator.py", line 173, in main(rank=gpu_list[0], args=args, ngpus_per_node=1) File "/home/root/code/Causal-Unsupervised-Segmentation/train_mediator.py", line 67, in main net = network_loader(args, rank) File "/home/root/code/Causal-Unsupervised-Segmentation/loader/netloader.py", line 9, in network_loader net = load_model(args.ckpt, rank).cuda() File "/home/root/code/Causal-Unsupervised-Segmentation/loader/netloader.py", line 98, in load_model net = getattr(model, arch)() File "/home/root/code/Causal-Unsupervised-Segmentation/models/dinomaevit.py", line 103, in dino_vit_base_8 model = DINOMAEVisionTransformer( File "/home/root/code/Causal-Unsupervised-Segmentation/models/dinomaevit.py", line 41, in init super(DINOMAEVisionTransformer, self).init(embed_layer=PatchEmbed_DimensionFree, **kwargs) File "/home/root/anaconda3/envs/neurips/lib/python3.9/site-packages/timm/models/vision_transformer.py", line 471, in init self.patch_embed = embed_layer( TypeError: init() got an unexpected keyword argument 'dynamic_img_pad'

ByungKwanLee commented 10 months ago

It seems timm library version mismatched error..

I used timm==0.9.5