Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 5eddd72

Browse files
committed
buf fixed: short connection
1 parent fbdab5a commit 5eddd72

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

net_stdf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ def __init__(self, opts_dict):
167167

168168
self.radius = opts_dict['radius']
169169
self.input_len = 2 * self.radius + 1
170+
self.in_nc = opts_dict['stdf']['in_nc']
170171
self.ffnet = STDF(
171-
in_nc=opts_dict['stdf']['in_nc'] * self.input_len,
172+
in_nc= self.in_nc * self.input_len,
172173
out_nc=opts_dict['stdf']['out_nc'],
173174
nf=opts_dict['stdf']['nf'],
174175
nb=opts_dict['stdf']['nb'],
@@ -184,5 +185,7 @@ def __init__(self, opts_dict):
184185
def forward(self, x):
185186
out = self.ffnet(x)
186187
out = self.qenet(out)
187-
out += x[:, self.radius: self.radius+1, ...] # res: add middle frame
188+
# e.g., B C=[B1 B2 B3 R1 R2 R3 G1 G2 G3] H W, B C=[Y1 Y2 Y3] H W or B C=[B1 ... B7 R1 ... R7 G1 ... G7] H W
189+
frm_lst = [self.radius + idx_c * self.input_len for idx_c in range(self.in_nc)]
190+
out += x[:, frm_lst, ...] # res: add middle frame
188191
return out

0 commit comments

Comments
 (0)