This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TD3/serveur.py | |
import http.server | |
import socketserver | |
from urllib.parse import urlparse, parse_qs | |
# définition du handler | |
class RequestHandler(http.server.SimpleHTTPRequestHandler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==================== Q2-1.py=========================== | |
import http.server | |
import socketserver | |
httpd = socketserver.TCPServer(("", 8080),http.server.SimpleHTTPRequestHandler) | |
httpd.serve_forever() | |
# ==================== END =========================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally | |
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally | |
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1, project: segmentation_cnn_eccv https://github.com/matt-rb/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 https://developer.nvidia.com/cuDNN | |
Then make sure files named as libcudnn.so.5 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo luarocks install OPENSSL | |
sudo rm -rf ~/.cache/luarocks | |
luarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl/ | |
git clone https://github.com/torch/image.git | |
cd image | |
luarocks make image-1.1.alpha-0.rockspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch | |
# This is for https://github.com/facebook/iTorch | |
# L4T 21.3, Torch 7 (http://torch.ch) | |
# 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 | |
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz | |
tar xzvf zeromq-4.0.5.tar.gz |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.