MCPcopy Create free account
hub / github.com/Kitware/COAT / to_device

Function to_device

engine.py:18–23  ·  view source on GitHub ↗
(images, targets, device)

Source from the content-addressed store, hash-verified

16
17
18def to_device(images, targets, device):
19 images = [image.to(device) for image in images]
20 for t in targets:
21 t["boxes"] = t["boxes"].to(device)
22 t["labels"] = t["labels"].to(device)
23 return images, targets
24
25
26def train_one_epoch(cfg, model, optimizer, data_loader, device, epoch, tfboard, softmax_criterion_s2, softmax_criterion_s3):

Callers 2

train_one_epochFunction · 0.85
evaluate_performanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected