Skip to content

Instantly share code, notes, and snippets.

View xiaofanglegoc's full-sized avatar

xiaofang wang xiaofanglegoc

View GitHub Profile
xiaofanglegoc /
Created January 9, 2018 15:26 — forked from ahwillia/
Alternating Minimization in Tensorflow (PCA example)
import numpy as np
import tensorflow as tf
# N, size of matrix. R, rank of data
N = 100
R = 5
# generate data
W_true = np.random.randn(N,R)
C_true = np.random.randn(R,N)
xiaofanglegoc /
Created May 23, 2017 06:35
# TD3/
import http.server
import socketserver
from urllib.parse import urlparse, parse_qs
# définition du handler
class RequestHandler(http.server.SimpleHTTPRequestHandler):
View TC3_serveur.txt
# ====================
import http.server
import socketserver
httpd = socketserver.TCPServer(("", 8080),http.server.SimpleHTTPRequestHandler)
# ==================== END ===========================
View learn_tensorflow
# install
## issu
1, TypeError: <method 'max' of 'numpy.ndarray' objects> is not a Python function
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
I tensorflow/stream_executor/] successfully opened CUDA library locally
I tensorflow/stream_executor/] successfully opened CUDA library locally
I tensorflow/stream_executor/] successfully opened CUDA library locally
xiaofanglegoc / issue using torch
Created June 21, 2016 10:04
solution for my usage of torch
View issue using torch
1, project: segmentation_cnn_eccv
1.1 cuDNN
/home/wang/torch/install/share/lua/5.1/trepl/init.lua:384: /home/wang/torch/install/share/lua/5.1/trepl/init.lua:384: /home/wang/torch/install/share/lua/5.1/cudnn/ffi.lua:1599: 'libcudnn (R5) not found in library path.
Please install CuDNN from
Then make sure files named as or libcudnn.5.dylib are placed in your library load path (for example /usr/local/lib , or manually add a path to LD_LIBRARY_PATH)
1.1 solution:
export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
sudo luarocks install OPENSSL
sudo rm -rf ~/.cache/luarocks
luarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl/
git clone
cd image
luarocks make image-1.1.alpha-0.rockspec
xiaofanglegoc /
Last active June 3, 2016 09:33 — forked from jetsonhacks/
Install iTorch and prerequisites
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch
# This is for
# L4T 21.3, Torch 7 (
# Python 2.7 or greater must be installed before running this script
# Torch 7 should already be installed before running this script
# iPython is loaded using pip, as repository version is 1.x version, > 2.0 is needed
# Need to compile from source as repository version libzmq3-dev is not the correct revision
tar xzvf zeromq-4.0.5.tar.gz
xiaofanglegoc / msrc_blog.ipynb
Created December 21, 2015 15:19 — forked from amueller/msrc_blog.ipynb
ipython notebook for msrc segmentation tutorial
View msrc_blog.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.