LoveDA icon indicating copy to clipboard operation
LoveDA copied to clipboard

The dict data type cann't be accessed by dot '.'

Open lauraset opened this issue 2 years ago • 6 comments

Hello, @Junjue-Wang. I want to know whether you have rewrited the dict data type. I can't accessed the members of dict by dot '.'. For example, for the SOURCE_DATA_CONFIG, when I try to obtain the value of 'image_dir', SOURCE_DATA_CONFIG['image_dir'] can work, but SOURCE_DATA_CONFIG.image_dir can not. image When you define LoveDALoader, the dot, e.g., config.batch_size can obtain the value of dict members. How to do it? Thank you in advance.

image

lauraset avatar Aug 24 '22 02:08 lauraset

Yes, we have re-implemented the dict for config

Junjue-Wang avatar Aug 25 '22 07:08 Junjue-Wang

@Junjue-Wang, Thank you very much. I still have one question about the clip_grad.clip_grad_norm_(filter(lambda p: p.requires_grad, model.parameters()), max_norm=35, norm_type=2). I guess the max_norm should be changed according to different datasets. Whether it is necessary for other new datasets? Thank you for your reply in advance.

lauraset avatar Aug 25 '22 08:08 lauraset

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}




    I think this is not sensitive to specific datasets
    

    
        
    


 

    
                ***@***.***
    




---- Replied Message ----



  
    
     From 
    
    
        ***@***.***>
        
    
  
  
    
     Date 
    
    
    8/25/2022 16:31
    
  
  
    
     To 
    
    
     
      
        ***@***.***>
        
      
    
  
  
    
     Cc 
    
    
      
        ***@***.***>
        ,
      
      
        ***@***.***>
        
      
    
  
  
    
     Subject 
    
    
          Re: [Junjue-Wang/LoveDA] The dict data type cann't be accessed by dot '.' (Issue #44)
    
  

@Junjue-Wang, Thank you very much. I still have one question about the clip_grad.clip_grad_norm_(filter(lambda p: p.requires_grad, model.parameters()), max_norm=35, norm_type=2). I guess the max_norm should be changed according to different datasets. Whether it is necessary for other new datasets? Thank you for your reply in advance.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Junjue-Wang avatar Aug 25 '22 08:08 Junjue-Wang

Oh, thank you anyway. I just want to know why max_norm is set to 35 . Do you set it by experiments?

lauraset avatar Aug 25 '22 09:08 lauraset

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}




    
        
    


    No, it is the default setting
    

 

    
                ***@***.***
    




---- Replied Message ----



  
    
     From 
    
    
        ***@***.***>
        
    
  
  
    
     Date 
    
    
    8/25/2022 17:13
    
  
  
    
     To 
    
    
     
      
        ***@***.***>
        
      
    
  
  
    
     Cc 
    
    
      
        ***@***.***>
        ,
      
      
        ***@***.***>
        
      
    
  
  
    
     Subject 
    
    
          Re: [Junjue-Wang/LoveDA] The dict data type cann't be accessed by dot '.' (Issue #44)
    
  

Oh, thank you anyway. I just want to know why max_norm is set to 35 . Do you set it by experiments?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Junjue-Wang avatar Aug 25 '22 09:08 Junjue-Wang

Oh, I see. Thank you a lot.

lauraset avatar Aug 25 '22 10:08 lauraset