Skip to content

Commit

Permalink
Update yolo.py (ultralytics#2899)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Apr 22, 2021
1 parent ea3deaf commit 0ba1c82
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,14 @@ def parse_model(d, ch): # model_dict, input_channels(3)
# Create model
model = Model(opt.cfg).to(device)
model.train()

# Profile
# img = torch.rand(8 if torch.cuda.is_available() else 1, 3, 640, 640).to(device)
# img = torch.rand(8 if torch.cuda.is_available() else 1, 3, 320, 320).to(device)
# y = model(img, profile=True)

# Tensorboard
# Tensorboard (not working https://github.com/ultralytics/yolov5/issues/2898)
# from torch.utils.tensorboard import SummaryWriter
# tb_writer = SummaryWriter()
# print("Run 'tensorboard --logdir=models/runs' to view tensorboard at http://localhost:6006/")
# tb_writer.add_graph(model.model, img) # add model to tensorboard
# tb_writer = SummaryWriter('.')
# print("Run 'tensorboard --logdir=models' to view tensorboard at http://localhost:6006/")
# tb_writer.add_graph(torch.jit.trace(model, img, strict=False), []) # add model graph
# tb_writer.add_image('test', img[0], dataformats='CWH') # add model to tensorboard

0 comments on commit 0ba1c82

Please sign in to comment.