Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rsomani95
rsomani95 / timm_ghostnet_yolox.py
Last active July 20, 2022 06:08
Example of how to load in a `timm` architecture with the YOLOX experiment setup. In this file, we're looking specifically at `ghostnet_100`, but this can be extended to any other architecture in `timm` that supports the `features_only` interface
import timm
import torch
import torch.distributed as dist
import torch.nn as nn
from upyog.imports import *
from yolox.exp.yolox_base import Exp as DefaultBaseExp
from yolox.models import YOLOPAFPN, YOLOX, YOLOXHead
from yolox.utils import get_local_rank, wait_for_the_master