{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import tensorflow as tf" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Simple hello world using TensorFlow\n", "\n", "# Create a Constant op\n", "# The op is added as a node to the default graph.\n", "#\n", "# The value returned by the constructor represents the output\n", "# of the Constant op." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tensor: tf.Tensor(b'hello, TensorFlow', shape=(), dtype=string)\n", "Value : b'hello, TensorFlow'\n" ] } ], "source": [ "helloworld = tf.constant(\"hello, TensorFlow\")\n", "print(\"Tensor:\", helloworld)\n", "print(\"Value :\", helloworld.numpy())" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }