Skip to content

Commit 652c17b

Browse files
committed
feature extractor
1 parent 777a470 commit 652c17b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

SyncNetInstance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def extract_feature(self, opt, videofile):
177177

178178
im_batch = [ imtv[:,:,vframe:vframe+5,:,:] for vframe in range(i,min(lastframe,i+opt.batch_size)) ]
179179
im_in = torch.cat(im_batch,0)
180-
im_out = self.__S__.forward_lip(im_in.cuda());
180+
im_out = self.__S__.forward_lipfeat(im_in.cuda());
181181
im_feat.append(im_out.data.cpu())
182182

183183
im_feat = torch.cat(im_feat,0)

SyncNetModel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def forward_lip(self, x):
108108

109109
def forward_lipfeat(self, x):
110110

111-
out = self.netcnnlip(x);
111+
mid = self.netcnnlip(x);
112+
out = mid.view((mid.size()[0], -1)); # N x (ch x 24)
112113

113114
return out;

0 commit comments

Comments
 (0)