MCPcopy Create free account
hub / github.com/RosettaCommons/RFdiffusion / __init__

Method __init__

rfdiffusion/Embeddings.py:272–290  ·  view source on GitHub ↗
(self, d_t1d=21+1+1, d_t2d=43+1, d_tor=30, d_pair=128, d_state=32, 
                 n_block=2, d_templ=64,
                 n_head=4, d_hidden=16, p_drop=0.25)

Source from the content-addressed store, hash-verified

270 #
271 #Added extra t1d dimension for contacting or not
272 def __init__(self, d_t1d=21+1+1, d_t2d=43+1, d_tor=30, d_pair=128, d_state=32,
273 n_block=2, d_templ=64,
274 n_head=4, d_hidden=16, p_drop=0.25):
275 super(Templ_emb, self).__init__()
276 # process 2D features
277 self.emb = nn.Linear(d_t1d*2+d_t2d, d_templ)
278 self.templ_stack = TemplatePairStack(n_block=n_block, d_templ=d_templ, n_head=n_head,
279 d_hidden=d_hidden, p_drop=p_drop)
280
281 self.attn = Attention(d_pair, d_templ, n_head, d_hidden, d_pair, p_drop=p_drop)
282
283 # process torsion angles
284 self.emb_t1d = nn.Linear(d_t1d+d_tor, d_templ)
285 self.proj_t1d = nn.Linear(d_templ, d_templ)
286 #self.tor_stack = TemplateTorsionStack(n_block=n_block, d_templ=d_templ, n_head=n_head,
287 # d_hidden=d_hidden, p_drop=p_drop)
288 self.attn_tor = Attention(d_state, d_templ, n_head, d_hidden, d_state, p_drop=p_drop)
289
290 self.reset_parameter()
291
292 def reset_parameter(self):
293 self.emb = init_lecun_normal(self.emb)

Callers

nothing calls this directly

Calls 4

reset_parameterMethod · 0.95
AttentionClass · 0.90
TemplatePairStackClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected