Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄

Weijie Su jackroos

🦄
View GitHub Profile
@jackroos
jackroos / compute_flops.py
Created Jun 29, 2020 — forked from fmassa/compute_flops.py
Utility functions used to compute flops in DETR.
View compute_flops.py
# 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