In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import grequests | |
import numpy as np | |
import pandas as pd | |
from lxml import html | |
from time import sleep | |
from datetime import date, timedelta |
# requirements: curl, jq, python, pandas | |
# brew install jq | |
# pip install pandas | |
# prints top 50 papers | |
curl -sS "https://openreview.net/notes?invitation=ICLR.cc%2F2018%2FConference%2F-%2FBlind_Submission&offset=0&limit=5000" | jq -r '.notes[] | .content.title + "\t" + (.replyCount|tostring)' > subset.tsv && python -c 'from pprint import pprint; import pandas as pd; d=pd.read_csv("subset.tsv", header=None, delimiter="\t"); d.columns=["title", "replies"]; pprint(d.sort_values(by="replies", ascending=False).head(50).title.tolist());' && rm -f subset.tsv | |
# number of papers in top 50 on adversarial networks |
import caffe | |
caffe.set_mode_cpu() | |
import numpy as np | |
from numpy import prod, sum | |
from pprint import pprint | |
def print_net_parameters (deploy_file): | |
print "Net: " + deploy_file | |
net = caffe.Net(deploy_file, caffe.TEST) | |
print "Layer-wise parameters: " |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.python.ops import seq2seq | |
from tensorflow.python.ops import rnn_cell | |
seed = 7 | |
np.random.seed(7) | |
def generate_sequences(sequence_num, sequence_length, batch_size): |
# Author: Kyle Kastner # License: BSD 3-Clause # For a reference on parallel processing in Python see tutorial by David Beazley # http://www.slideshare.net/dabeaz/an-introduction-to-python-concurrency # Loosely based on IBM example # http://www.ibm.com/developerworks/aix/library/au-threadingpython/ # If you want to download all the PASCAL VOC data, use the following in bash... """ #! /bin/bash # 2008 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2008/VOCtrainval_14-Jul-2008.tar # 2009 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2009/VOCtrainval_11-May-2009.tar # 2010 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2010/VOCtrainval_03-May-2010.tar # 2011 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2011/VOCtrainval_25-May-2011.tar # 2012 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar # Latest devkit wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCdevkit_18-May-2011.tar """ try: import Queue except ImportError: import queue as Queue import threading import ti |
Computation Graph:
Instantiating Variable objects as well as Ops objects adds to a graph of computation that is tracked by tf.
After building your computation graph, where nodes are Variables or Ops or Constants, you can retrieve the executed and resulting value of any of the nodes in the graph.
The difference between Ops and Variables:
- Ops take Tensor inputs and return Tensor outputs, they have no internal state.
#!/usr/bin/env python | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
import cv2 | |
import sys | |
class MainApp(QWidget): | |
def __init__(self): |
A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.
The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.
What can you say?