Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows10环境下安装问题 #118

Open
raderqi opened this issue Sep 7, 2024 · 4 comments
Open

windows10环境下安装问题 #118

raderqi opened this issue Sep 7, 2024 · 4 comments

Comments

@raderqi
Copy link

raderqi commented Sep 7, 2024

测试安装是否正确时,执行python run_trainer.py,出现报错
error1
报错代码指向core/trainer.py 453行代码
error2
但是yaml配置文件说明中并没有提到这两个参数

请问一下您,我该如何处理这个问题正确安装呢?换成linux系统可以解决这个问题吗?
请问一下您这两个参数的作用分别是什么?

@raderqi
Copy link
Author

raderqi commented Sep 7, 2024

执行run_trainer.py文件下,print(config),输出如下内容

config = {'data_root': 'data/miniImageNet--ravi',
          'image_size': 84, 'use_memory': False,
          'augment': True, 'augment_times': 1,
          'augment_times_query': 1,
          'workers': 0,
          'dataloader_num': 1,
          'device_ids': 0,
          'n_gpu': 1,
          'seed': 2147483647,
          'deterministic': True,
          'port': 54025,
          'log_name': None,
          'log_level': 'info',
          'log_interval': 100,
          'log_paramerter': False,
          'result_root': './resultsDF20Res18',
          'save_interval': 10,
          'save_part': ['emb_func'],
          'tag': None,
          'epoch': 50,
          'test_epoch': 5,
          'parallel_part': ['emb_func'],
          'pretrain_path': None,
          'resume': False,
          'way_num': 5,
          'shot_num': 5,
          'query_num': 15,
          'test_way': 5,
          'test_shot': 5,
          'test_query': 15,
          'episode_size': 1,
          'train_episode': 100,
          'test_episode': 100,
          'batch_size': 128,
          'val_per_epoch': 1,
          'optimizer': {'name': 'Adam', 'kwargs': {'lr': 0.001}, 'other': None},
          'lr_scheduler': {'name': 'StepLR', 'kwargs': {'gamma': 0.5, 'step_size': 20}},
          'warmup': 0,
          'includes': ['headers/data.yaml',
                       'headers/device.yaml',
                        'headers/misc.yaml',
                       'headers/model.yaml',
                        'headers/optimizer.yaml',
                       'classifiers/ConvMNet.yaml',
                        'backbones/Conv64F.yaml'],
          'backbone': {'name': 'Conv64F', 'kwargs': {'is_flatten': False, 'is_feature': False, 'leaky_relu': True, 'negative_slope': 0.2, 'last_pool': False, 'maxpool_last2': False}},
          'classifier': {'name': 'ConvMNet','kwargs': {'n_local': 441}}, 'tb_scale': 1.0}

@raderqi
Copy link
Author

raderqi commented Sep 7, 2024

发现其中并没有ssl_task参数,于是尝试人为指定该参数
image
出现报错内容如下图
image
发现缺少ssl_lbda参数,于是人为指定该参数
image
再次运行,仍旧报错,报错内容如下
image
出错的代码是这个地方
image

@raderqi
Copy link
Author

raderqi commented Sep 7, 2024

尝试print(self.emb_func),输出如下

Conv64F(                            trainer.py:406
                               (layer1): Sequential(                           
                                 (0): Conv2d(3, 64,                            
                             kernel_size=(3, 3), stride=(1, 1),                
                             padding=(1, 1))                                   
                                 (1): BatchNorm2d(64, eps=1e-05,               
                             momentum=0.1, affine=True,                        
                             track_running_stats=True)                         
                                 (2):                                          
                             LeakyReLU(negative_slope=0.2,                     
                             inplace=True)                                     
                                 (3): MaxPool2d(kernel_size=2,                 
                             stride=2, padding=0, dilation=1,                  
                             ceil_mode=False)                                  
                               )                                               
                               (layer2): Sequential(                           
                                 (0): Conv2d(64, 64,                           
                             kernel_size=(3, 3), stride=(1, 1),                
                             padding=(1, 1))                                   
                                 (1): BatchNorm2d(64, eps=1e-05,               
                             momentum=0.1, affine=True,                        
                             track_running_stats=True)                         
                                 (2):                                          
                             LeakyReLU(negative_slope=0.2,                     
                             inplace=True)                                     
                                 (3): MaxPool2d(kernel_size=2,                 
                             stride=2, padding=0, dilation=1,                  
                             ceil_mode=False)                                  
                               )                                               
                               (layer3): Sequential(                           
                                 (0): Conv2d(64, 64,                           
                             kernel_size=(3, 3), stride=(1, 1),                
                             padding=(1, 1))                                   
                                 (1): BatchNorm2d(64, eps=1e-05,               
                             momentum=0.1, affine=True,                        
                             track_running_stats=True)                         
                                 (2):                                          
                             LeakyReLU(negative_slope=0.2,                     
                             inplace=True)                                     
                               )                                               
                               (layer3_maxpool):                               
                             MaxPool2d(kernel_size=2, stride=2,                
                             padding=0, dilation=1,                            
                             ceil_mode=False)                                  
                               (layer4): Sequential(                           
                                 (0): Conv2d(64, 64,                           
                             kernel_size=(3, 3), stride=(1, 1),                
                             padding=(1, 1))                                   
                                 (1): BatchNorm2d(64, eps=1e-05,               
                             momentum=0.1, affine=True,                        
                             track_running_stats=True)                         
                                 (2):                                          
                             LeakyReLU(negative_slope=0.2,                     
                             inplace=True)                                     
                               )                                               
                               (layer4_pool):                                  
                             MaxPool2d(kernel_size=2, stride=2,                
                             padding=0, dilation=1,                            
                             ceil_mode=False)                                  
                             )           

确实没有avg_pool,采用的是MaxPool。请问一下您上述bug该如何解决呢?非常希望能够在您提出来的框架下研究few-shot问题

@VincenDen
Copy link
Contributor

试一下换成“/reproduce/Proto/ProtoNet-miniImageNet-Conv64F-5-1-Table2.yaml“

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants