MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / __init__

Method __init__

mogen/models/rnns/t2m_bigru.py:108–118  ·  view source on GitHub ↗
(self, word_size, pos_size, hidden_size, output_size,
                 max_text_len)

Source from the content-addressed store, hash-verified

106class T2MTextEncoder(nn.Module):
107
108 def __init__(self, word_size, pos_size, hidden_size, output_size,
109 max_text_len):
110 super().__init__()
111 self.text_encoder = TextEncoderBiGRUCo(
112 word_size=word_size,
113 pos_size=pos_size,
114 hidden_size=hidden_size,
115 output_size=output_size,
116 )
117 self.w_vectorizer = WordVectorizer('./data/glove', 'our_vab')
118 self.max_text_len = max_text_len
119
120 def load_pretrained(self, ckpt_path):
121 checkpoint = torch.load(ckpt_path, map_location='cpu')

Callers 6

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

WordVectorizerClass · 0.90
TextEncoderBiGRUCoClass · 0.85

Tested by

no test coverage detected