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

Method __init__

detrsmpl/core/post_processing/speed_up/deciwatch.py:198–229  ·  view source on GitHub ↗
(self,
                 input_dim=24 * 6,
                 sample_interval=10,
                 encoder_hidden_dim=16,
                 decoder_hidden_dim=16,
                 dropout=0.1,
                 nheads=4,
                 dim_feedforward=256,
                 enc_layers=3,
                 dec_layers=3,
                 activation='leaky_relu',
                 pre_norm=False)

Source from the content-addressed store, hash-verified

196 """
197
198 def __init__(self,
199 input_dim=24 * 6,
200 sample_interval=10,
201 encoder_hidden_dim=16,
202 decoder_hidden_dim=16,
203 dropout=0.1,
204 nheads=4,
205 dim_feedforward=256,
206 enc_layers=3,
207 dec_layers=3,
208 activation='leaky_relu',
209 pre_norm=False):
210 super(DeciWatch, self).__init__()
211 self.pos_embed_dim = encoder_hidden_dim
212 self.pos_embed = self.build_position_encoding(self.pos_embed_dim)
213
214 self.sample_interval = sample_interval
215
216 self.deciwatch_par = {
217 'input_dim': input_dim,
218 'encoder_hidden_dim': encoder_hidden_dim,
219 'decoder_hidden_dim': decoder_hidden_dim,
220 'dropout': dropout,
221 'nheads': nheads,
222 'dim_feedforward': dim_feedforward,
223 'enc_layers': enc_layers,
224 'dec_layers': dec_layers,
225 'activation': activation,
226 'pre_norm': pre_norm
227 }
228
229 self.transformer = build_model(self.deciwatch_par)
230
231 def build_position_encoding(self, pos_embed_dim):
232 N_steps = pos_embed_dim // 2

Callers 7

__init__Method · 0.45
__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

build_modelFunction · 0.85

Tested by

no test coverage detected