def __init__(self, in_channels, char_num, max_text_length, num_heads, num_encoder_tus, hidden_dims):
    super(PVAM, self).__init__()
    self.char_num = char_num
    self.max_length = max_text_length
    self.num_heads = num_heads
    self.num_encoder_TUs = num_encoder_tus
    self.hidden_dims = hidden_dims
    t = 256
    self.wrap_encoder_for_feature = WrapEncoderForFeature(src_vocab_size=1, max_length=t, n_layer=self.num_encoder_TUs, n_head=self.num_heads, d_key=int((self.hidden_dims / self.num_heads)), d_value=int((self.hidden_dims / self.num_heads)), d_model=self.hidden_dims, d_inner_hid=self.hidden_dims, prepostprocess_dropout=0.1, attention_dropout=0.1, relu_dropout=0.1, preprocess_cmd='n', postprocess_cmd='da', weight_sharing=True)
    self.flatten0 = nn.Flatten(start_dim=0, end_dim=1)
    self.fc0 = nn.Linear(in_features=in_channels, out_features=in_channels)
    self.emb = nn.Embedding(num_embeddings=self.max_length, embedding_dim=in_channels)
    self.flatten1 = nn.Flatten(start_dim=0, end_dim=2)
    self.fc1 = nn.Linear(in_features=in_channels, out_features=1, bias=False)
def __init__(self, in_channels, char_num, max_text_length, num_heads, num_encoder_tus, hidden_dims):
    super(PVAM, self).__init__()
    self.char_num = char_num
    self.max_length = max_text_length
    self.num_heads = num_heads
    self.num_encoder_TUs = num_encoder_tus
    self.hidden_dims = hidden_dims
    t = 256
    self.wrap_encoder_for_feature = WrapEncoderForFeature(src_vocab_size=1, max_length=t, n_layer=self.num_encoder_TUs, n_head=self.num_heads, d_key=int((self.hidden_dims / self.num_heads)), d_value=int((self.hidden_dims / self.num_heads)), d_model=self.hidden_dims, d_inner_hid=self.hidden_dims, prepostprocess_dropout=0.1, attention_dropout=0.1, relu_dropout=0.1, preprocess_cmd='n', postprocess_cmd='da', weight_sharing=True)
    self.flatten0 = nn.Flatten(start_dim=0, end_dim=1)
    self.fc0 = nn.Linear(in_features=in_channels, out_features=in_channels)
    self.emb = nn.Embedding(num_embeddings=self.max_length, embedding_dim=in_channels)
    self.flatten1 = nn.Flatten(start_dim=0, end_dim=2)
    self.fc1 = nn.Linear(in_features=in_channels, out_features=1, bias=False)