Skip to content

Instantly share code, notes, and snippets.

View huyhoang17's full-sized avatar
🎯
Focusing

Phan Hoang huyhoang17

🎯
Focusing
View GitHub Profile
@huyhoang17
huyhoang17 / autoreload.md
Created November 1, 2018 09:00 — forked from deehzee/autoreload.md
Auto reload of modules in jupyter notebook

Module autoreload

To auto-reload modules in jupyter notebook (so that changes in files *.py doesn't require manual reloading):

# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
@huyhoang17
huyhoang17 / cuda_installation_on_ubuntu_18.04
Created October 30, 2018 17:59 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@huyhoang17
huyhoang17 / Triplet Loss.ipynb
Created October 27, 2018 04:33 — forked from kylemcdonald/Triplet Loss.ipynb
Experimenting with triplet loss embeddings.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@huyhoang17
huyhoang17 / Troubleshoot-dcnn.md
Created August 20, 2018 11:32 — forked from zeyademam/Troubleshoot-dcnn.md
Troubleshooting Convolutional Neural Nets

Troubleshooting Convolutional Neural Networks

Intro

This is a list of hacks gathered primarily from prior experiences as well as online sources (most notably Stanford's CS231n course notes) on how to troubleshoot the performance of a convolutional neural network . We will focus mainly on supervised learning using deep neural networks. While this guide assumes the user is coding in Python3.6 using tensorflow (TF), it can still be helpful as a language agnostic guide.

Suppose we are given a convolutional neural network to train and evaluate and assume the evaluation results are worse than expected. The following are steps to troubleshoot and potentially improve performance. The first section corresponds to must-do's and generally good practices before you start troubleshooting. Every subsequent section header corresponds to a problem and the section is devoted to solving it. The sections are ordered to reflect "more common" issues first and under each header the "most-eas

@huyhoang17
huyhoang17 / gist:85e02470cd9c50e2418015b363923188
Created February 20, 2018 11:06 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@huyhoang17
huyhoang17 / context.py
Created November 15, 2017 16:17 — forked from bradmontgomery/context.py
simple examples of a context manager in python
"""
Simple example of building your own context manager.
Resources:
- http://preshing.com/20110920/the-python-with-statement-by-example/
- https://docs.python.org/3/library/contextlib.html
- PEP 343 -- the "with" statement: https://www.python.org/dev/peps/pep-0343/
"""
@huyhoang17
huyhoang17 / readme.md
Created November 13, 2017 04:22 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@huyhoang17
huyhoang17 / mlp.py
Created October 13, 2017 14:29 — forked from amueller/mlp.py
Multi-Layer Perceptron for scikit-learn with SGD in Python
import numpy as np
import warnings
from itertools import cycle, izip
from sklearn.utils import gen_even_slices
from sklearn.utils import shuffle
from sklearn.base import BaseEstimator
from sklearn.base import ClassifierMixin
from sklearn.preprocessing import LabelBinarizer
@huyhoang17
huyhoang17 / coding_standard.py
Created September 23, 2017 09:25 — forked from nateGeorge/coding_standard.py
coding standards, originally from enthought
# taken from here: http://web.archive.org/web/20110527163743/https://svn.enthought.com/enthought/browser/sandbox/docs/coding_standard.py
""" This module is an example of the Enthought Python coding standards.
It was adapted from the Python Enhancement Proposal 8 (aka PEP 8) titled
'Style Guide for Python Code' (http://www.python.org/peps/pep-0008.html).
The first item in a module must be a documentation string (docstring). The
first line of the docstring should be a one line summary. If a more
detailed description is required, put an empty line before it.
@huyhoang17
huyhoang17 / restore_tf_models.py
Created August 30, 2017 17:00 — forked from tokestermw/restore_tf_models.py
Restoring frozen models are hard in TensorFlow.
"""
Play with saving .
Closest:
https://github.com/tensorflow/tensorflow/issues/616#issuecomment-205620223
"""
import numpy as np
import tensorflow as tf
from tensorflow.python.platform import gfile