Skip to content

Instantly share code, notes, and snippets.

View jackroos's full-sized avatar
🦄

Weijie Su jackroos

🦄
View GitHub Profile
@jackroos
jackroos / compute_flops.py
Created June 29, 2020 11:34 — forked from fmassa/compute_flops.py
Utility functions used to compute flops in DETR.
# this is the main entrypoint
# as we describe in the paper, we compute the flops over the first 100 images
# on COCO val2017, and report the average result
import torch
import time
import torchvision
import numpy as np
import tqdm