File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
pvnet/models/multimodal/site_encoders Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import einops
6
6
import torch
7
- from ocf_datapipes .batch import BatchKey
8
7
from torch import nn
9
8
10
9
from pvnet .models .multimodal .linear_networks .networks import ResFCNet2
@@ -75,13 +74,15 @@ def __init__(
75
74
)
76
75
77
76
def _calculate_attention (self , x ):
78
- gsp_ids = x [BatchKey .gsp_id ].squeeze ().int ()
77
+ gsp_ids = x [" BatchKey.gsp_id" ].squeeze ().int ()
79
78
attention = self ._attention_network (gsp_ids )
80
79
return attention
81
80
82
81
def _encode_value (self , x ):
83
82
# Shape: [batch size, sequence length, PV site]
84
- pv_site_seqs = x [BatchKey .pv ].float ()
83
+ for key in x .keys ():
84
+ print (key )
85
+ pv_site_seqs = x ["BatchKey.pv" ].float ()
85
86
batch_size = pv_site_seqs .shape [0 ]
86
87
87
88
pv_site_seqs = pv_site_seqs .swapaxes (1 , 2 ).flatten (0 , 1 )
You can’t perform that action at this time.
0 commit comments