Skip to content

Instantly share code, notes, and snippets.

View IdeaKing's full-sized avatar
💭
Thinking

Thomas Chia IdeaKing

💭
Thinking
View GitHub Profile
@piouson
piouson / react-native-app-in-wsl2.md
Last active November 17, 2025 11:52 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@ceshine
ceshine / profiling.ipynb
Created April 24, 2020 06:31
Tensorflow Profiler with Custom Training Loop
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wassname
wassname / keras_weighted_categorical_crossentropy.py
Last active October 10, 2024 00:52
Keras weighted categorical_crossentropy (please read comments for updated version)
"""
A weighted version of categorical_crossentropy for keras (2.0.6). This lets you apply a weight to unbalanced classes.
@url: https://gist.github.com/wassname/ce364fddfc8a025bfab4348cf5de852d
@author: wassname
"""
from keras import backend as K
def weighted_categorical_crossentropy(weights):
"""
A weighted version of keras.objectives.categorical_crossentropy
@wllhf
wllhf / VOClabelcolormap.py
Last active December 6, 2025 00:19
Python implementation of the color map function for the PASCAL VOC data set.
"""
Python implementation of the color map function for the PASCAL VOC data set.
Official Matlab version can be found in the PASCAL VOC devkit
http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit
"""
import numpy as np
from skimage.io import imshow
import matplotlib.pyplot as plt
def color_map(N=256, normalized=False):