|
|
|
|
|
|
|
|
plots=True, |
|
|
plots=True, |
|
|
wandb_logger=None, |
|
|
wandb_logger=None, |
|
|
compute_loss=None, |
|
|
compute_loss=None, |
|
|
|
|
|
half_precision=True, |
|
|
is_coco=False): |
|
|
is_coco=False): |
|
|
# Initialize/load model and set device |
|
|
# Initialize/load model and set device |
|
|
training = model is not None |
|
|
training = model is not None |
|
|
|
|
|
|
|
|
# model = nn.DataParallel(model) |
|
|
# model = nn.DataParallel(model) |
|
|
|
|
|
|
|
|
# Half |
|
|
# Half |
|
|
half = device.type != 'cpu' # half precision only supported on CUDA |
|
|
|
|
|
|
|
|
half = device.type != 'cpu' and half_precision # half precision only supported on CUDA |
|
|
if half: |
|
|
if half: |
|
|
model.half() |
|
|
model.half() |
|
|
|
|
|
|