Skip to content

Commit 3edaeeb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4d5c370 commit 3edaeeb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pvnet/models/multimodal/site_encoders/encoders.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,24 @@ def __init__(
7474
)
7575

7676
def _calculate_attention(self, x):
77-
i=0
77+
i = 0
7878
for key in x.keys():
79-
if(i==17):
80-
ans=key
79+
if i == 17:
80+
ans = key
8181
print(key, type(key))
82-
i+=1
82+
i += 1
8383
gsp_ids = x[ans].squeeze().int()
8484
attention = self._attention_network(gsp_ids)
8585
return attention
8686

8787
def _encode_value(self, x):
8888
# Shape: [batch size, sequence length, PV site]
89-
i=0
89+
i = 0
9090
for key in x.keys():
91-
if(i==6):
92-
ans=key
91+
if i == 6:
92+
ans = key
9393
print(key, type(key))
94-
i+=1
94+
i += 1
9595
pv_site_seqs = x[ans].float()
9696
batch_size = pv_site_seqs.shape[0]
9797

0 commit comments

Comments
 (0)