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__(
74
74
)
75
75
76
76
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 ()
78
84
attention = self ._attention_network (gsp_ids )
79
85
return attention
80
86
81
87
def _encode_value (self , x ):
82
88
# Shape: [batch size, sequence length, PV site]
89
+ i = 0
83
90
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 ()
86
96
batch_size = pv_site_seqs .shape [0 ]
87
97
88
98
pv_site_seqs = pv_site_seqs .swapaxes (1 , 2 ).flatten (0 , 1 )
You can’t perform that action at this time.
0 commit comments