def __init__(self, layers_setting, max_segment, segment_atten_type, attention_norm_type, inter_activation, attention_dropout_prob, hidden_dropout_prob, output_dropout_prob):
    super(SketchSegmentEncoder, self).__init__()
    layer_paras = {'max_segment': max_segment, 'segment_atten_type': segment_atten_type, 'attention_norm_type': attention_norm_type, 'inter_activation': inter_activation, 'attention_dropout_prob': attention_dropout_prob, 'hidden_dropout_prob': hidden_dropout_prob, 'output_dropout_prob': output_dropout_prob}
    self.layers = []
    self.max_segment = max_segment
    for layer_setting in layers_setting:
        setting2dict(layer_paras, layer_setting)
        self.layers.append(SketchSegmentLayer(**layer_paras))
    self.layers = nn.ModuleList(self.layers)
def __init__(self, layers_setting, max_segment, segment_atten_type, attention_norm_type, inter_activation, attention_dropout_prob, hidden_dropout_prob, output_dropout_prob):
    super(SketchSegmentEncoder, self).__init__()
    layer_paras = {'max_segment': max_segment, 'segment_atten_type': segment_atten_type, 'attention_norm_type': attention_norm_type, 'inter_activation': inter_activation, 'attention_dropout_prob': attention_dropout_prob, 'hidden_dropout_prob': hidden_dropout_prob, 'output_dropout_prob': output_dropout_prob}
    self.layers = []
    self.max_segment = max_segment
    for layer_setting in layers_setting:
        setting2dict(layer_paras, layer_setting)
        self.layers.append(SketchSegmentLayer(**layer_paras))
    self.layers = nn.ModuleList(self.layers)