def __init__(self, num_heads, hidden_dim, inter_dim, max_segment, segment_atten_type, attention_norm_type, inter_activation, attention_dropout_prob, hidden_dropout_prob, output_dropout_prob):
    super(SketchSegmentLayer, self).__init__()
    self.max_segment = max_segment
    self.inter_dim = inter_dim
    self.segment_atten_type = segment_atten_type
    self.local_attention = SketchMultiHeadAttention(num_heads, hidden_dim, attention_norm_type, attention_dropout_prob, hidden_dropout_prob)
    self.segment_attention = SketchMultiHeadAttention(num_heads, hidden_dim, attention_norm_type, attention_dropout_prob, hidden_dropout_prob)
    self.local_inter_layer = SketchIntermediate(hidden_dim, (inter_dim // 2), inter_activation)
    self.seg_inter_layer = SketchIntermediate(hidden_dim, (inter_dim // 2), inter_activation)
    self.output = SketchOutput(inter_dim, hidden_dim, attention_norm_type, output_dropout_prob)
def __init__(self, num_heads, hidden_dim, inter_dim, max_segment, segment_atten_type, attention_norm_type, inter_activation, attention_dropout_prob, hidden_dropout_prob, output_dropout_prob):
    super(SketchSegmentLayer, self).__init__()
    self.max_segment = max_segment
    self.inter_dim = inter_dim
    self.segment_atten_type = segment_atten_type
    self.local_attention = SketchMultiHeadAttention(num_heads, hidden_dim, attention_norm_type, attention_dropout_prob, hidden_dropout_prob)
    self.segment_attention = SketchMultiHeadAttention(num_heads, hidden_dim, attention_norm_type, attention_dropout_prob, hidden_dropout_prob)
    self.local_inter_layer = SketchIntermediate(hidden_dim, (inter_dim // 2), inter_activation)
    self.seg_inter_layer = SketchIntermediate(hidden_dim, (inter_dim // 2), inter_activation)
    self.output = SketchOutput(inter_dim, hidden_dim, attention_norm_type, output_dropout_prob)