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
datalab create instance_name --machine-type=f1-micro |
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
datalab connect instance_name |
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 tensorflow as tf | |
const = tf.constant("hello tensorflow") | |
with tf.Session() as sess: | |
result = sess.run(const) | |
print(result) |
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
%writefile ./package/simple_code.py | |
import tensorflow as tf | |
const = tf.constant("hello tensorflow") | |
with tf.Session() as sess: | |
result = sess.run(const) | |
print(result) |
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
%bash | |
gcloud ml-engine jobs submit training first_job_submit \ | |
--module-name=package.simple_code \ | |
--package-path=$(pwd)/package \ | |
--region=us-east1 \ | |
--staging-bucket=gs://tensorflowprojects-mlengine \ |
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
%writefile ./package/simple_neuralnet.py | |
import tensorflow as tf | |
up = [i for i in range(10)] | |
down = [9-i for i in range(10)] | |
x = tf.constant([up if i%2 == 0 else down for i in range(1000)], tf.float32) | |
y_ = tf.constant([[1] if i%2 == 0 else [0] for i in range(1000)], tf.float32) | |
layer1 = tf.layers.dense(x, 10) |
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
gcloud ml-engine jobs submit training simple_neuralnet \ | |
--module-name=package.simple_neuralnet \ | |
--package-path=$(pwd)/package \ | |
--region=us-east1 \ | |
--staging-bucket=gs://tensorflowprojects-mlengine |
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
gcloud ml-engine jobs submit training simple_neuralnet_gpu \ | |
--module-name=package.simple_neuralnet \ | |
--package-path=$(pwd)/package \ | |
--region=us-east1 \ | |
--staging-bucket=gs://tensorflowprojects-mlengine \ | |
--scale-tier=BASIC_GPU |
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
%writefile ./config.yaml | |
trainingInput: | |
masterType: complex_model_m_gpu |
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
gcloud ml-engine jobs submit training simple_neuralnet_8gpu \ | |
--module-name=package.simple_neuralnet \ | |
--package-path=$(pwd)/package \ | |
--region=us-east1 \ | |
--staging-bucket=gs://tensorflowprojects-mlengine \ | |
--scale-tier=CUSTOM \ | |
--config=./config.yaml |
OlderNewer