Skip to content

Instantly share code, notes, and snippets.

View gongzhitaao's full-sized avatar
🐢
(๑•̀ㅂ•́)و✧

Zhitao Gong gongzhitaao

🐢
(๑•̀ㅂ•́)و✧
  • DeepMind
  • Montreal, CA
  • 05:53 (UTC -04:00)
View GitHub Profile
@gongzhitaao
gongzhitaao / COMP2710 README.md
Last active April 27, 2018 20:35
Comments for COMP2710 Spring 2018

This a collection of tips and feedbacks for COMP2710 Software Construction Spring 2018.

  1. Grading script for hw1 gist.
  2. Grading script for hw2 gist.
@gongzhitaao
gongzhitaao / 0tmp.png
Last active September 16, 2018 23:45
Plot top5 probabilities and labels
0tmp.png
@gongzhitaao
gongzhitaao / py-logger-template.py
Last active February 23, 2025 06:51
Python logging template
import logging
import logging.config
from datetime import datetime
import os
import sys
LOGFILE = '/tmp/{0}.{1}.log'.format(
os.path.basename(__file__),
datetime.now().strftime('%Y%m%dT%H%M%S'))
@gongzhitaao
gongzhitaao / pytorch-print.py
Created September 16, 2018 18:52
Get output from intermediatelayers
from functools import partial
def foo(self, inp, out, name=''):
log.debug('layer name {}'.format(name))
log.debug('input size {}'.format(inp[0].size()))
log.debug('output size {}'.format(out[0].size()))
bar = partial(foo, name='Conv2d_1a_3x3')
@gongzhitaao
gongzhitaao / COMP2710-2019.md
Last active June 4, 2019 18:56
COMP 2710 2019 Spring Grading Script

This gist contains all the grading script for COMP2710 2019 Spring session.