Skip to content

Instantly share code, notes, and snippets.

View hlzhang109's full-sized avatar
:electron:

Hanlin Zhang hlzhang109

:electron:
View GitHub Profile
@alexandreelise
alexandreelise / README.md
Last active February 7, 2024 07:18
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04

Hi! gcc users

There is good news for you. I made a new repository with a single Dockerfile to build every combinations of versions of Ubuntu LTS and gcc you like

Find out more on https://github.com/alexandreelise/install-gcc

@gpleiss
gpleiss / reliability_diagram.py
Created May 23, 2018 23:42
Reliability diagram code
import torch
import numpy as np
from matplotlib import pyplot as plt
def make_model_diagrams(outputs, labels, n_bins=10):
"""
outputs - a torch tensor (size n x num_classes) with the outputs from the final linear layer
- NOT the softmaxes
labels - a torch tensor (size n) with the labels
"""