File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
pvnet/models/multimodal/site_encoders Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -74,15 +74,25 @@ def __init__(
7474 )
7575
7676 def _calculate_attention (self , x ):
77- gsp_ids = x ["BatchKey.gsp_id" ].squeeze ().int ()
77+ i = 0
78+ for key in x .keys ():
79+ if (i == 17 ):
80+ ans = key
81+ print (key , type (key ))
82+ i += 1
83+ gsp_ids = x [ans ].squeeze ().int ()
7884 attention = self ._attention_network (gsp_ids )
7985 return attention
8086
8187 def _encode_value (self , x ):
8288 # Shape: [batch size, sequence length, PV site]
89+ i = 0
8390 for key in x .keys ():
84- print (key )
85- pv_site_seqs = x ["BatchKey.pv" ].float ()
91+ if (i == 6 ):
92+ ans = key
93+ print (key , type (key ))
94+ i += 1
95+ pv_site_seqs = x [ans ].float ()
8696 batch_size = pv_site_seqs .shape [0 ]
8797
8898 pv_site_seqs = pv_site_seqs .swapaxes (1 , 2 ).flatten (0 , 1 )
You can’t perform that action at this time.
0 commit comments