by Asim Jalis, MetaProse.com
Create a file __main__.py
containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip
by typing:
by Asim Jalis, MetaProse.com
Create a file __main__.py
containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip
by typing:
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
$ tree data/mydataset/raw | |
person-1 | |
├── image-1.jpg | |
├── image-2.png | |
... | |
└── image-p.png | |
... | |
person-m |
import numpy as np | |
import tensorflow as tf | |
__author__ = "Sangwoong Yoon" | |
def np_to_tfrecords(X, Y, file_path_prefix, verbose=True): | |
""" | |
Converts a Numpy array (or two Numpy arrays) into a tfrecord file. | |
For supervised learning, feed training inputs to X and training labels to Y. | |
For unsupervised learning, only feed training inputs to X, and feed None to Y. |
import tensorflow as tf | |
filenames = ["hdfs://10.152.104.73:8020/sogou/train_data/1_final.feature_transform"] | |
dataset = tf.data.TextLineDataset(filenames) | |
iterator = dataset.make_one_shot_iterator() | |
next_batch = iterator.get_next() |
"""Script to illustrate usage of tf.estimator.Estimator in TF v1.3""" | |
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data as mnist_data | |
from tensorflow.contrib import slim | |
from tensorflow.contrib.learn import ModeKeys | |
from tensorflow.contrib.learn import learn_runner | |
# Show debugging output |