Skip to content

Instantly share code, notes, and snippets.

View qizhuli's full-sized avatar
🌴
On vacation

Qizhu Li qizhuli

🌴
On vacation
View GitHub Profile
@qizhuli
qizhuli / vis_model.py
Last active March 17, 2021 03:14
Visualise maskrcnn-benchmark models using pytorchviz.
# Set up custom environment before nearly anything else is imported
# NOTE: this should be the first import (no not reorder)
from maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:skip
import argparse
import os
import torch
from maskrcnn_benchmark.config import cfg
from maskrcnn_benchmark.modeling.detector import build_detection_model
@qizhuli
qizhuli / pytorchviz_output.dot
Created February 28, 2019 16:30
Output of vis_model.py of "python tools/vis_model.py --config-file configs/e2e_mask_rcnn_R_50_FPN_1x.yaml"
digraph {
graph [size="145.79999999999998,145.79999999999998"]
node [align=left fontsize=12 height=0.2 ranksep=0.1 shape=box style=filled]
140156541355456 [label=NllLossBackward fillcolor=darkolivegreen1]
140156541355512 -> 140156541355456
140156541355512 [label=LogSoftmaxBackward]
140156541355904 -> 140156541355512
140156541355904 [label=AddmmBackward]
140156541355232 -> 140156541355904
140156541355232 [label="roi_heads.box.predictor.cls_score.bias