Update trainer.py

BradyFU-patch-1
YifanXu 2023-10-20 21:55:41 +08:00 committed by GitHub
parent 1e629704c3
commit ad57a7086c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -106,6 +106,7 @@ def do_train(
try:
targets = [target.to(device) for target in targets]
captions = [t.get_field("caption") for t in targets if "caption" in t.fields()]
positive_map = positive_map.to(device)
except:
pass
# Freeze language backbone