Update inference.md

video writer need a close() to prevent video length is not enough
pull/251/head
nan jiang 1 year ago committed by GitHub
parent 53d74c6826
commit 0df6fd41cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -121,6 +121,7 @@ with torch.no_grad():
for src in DataLoader(reader): for src in DataLoader(reader):
fgr, pha, *rec = model(src.cuda(), *rec, downsample_ratio=0.25) # Cycle the recurrent states. fgr, pha, *rec = model(src.cuda(), *rec, downsample_ratio=0.25) # Cycle the recurrent states.
writer.write(fgr * pha + bgr * (1 - pha)) writer.write(fgr * pha + bgr * (1 - pha))
writer.close()
``` ```
Or you can use the provided video converter: Or you can use the provided video converter:

Loading…
Cancel
Save