Skip to content

Commit 0d3689b

Browse files
committed
added backend demo
1 parent 2736a8a commit 0d3689b

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

keras-autoencoder/backend.ipynb

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [
8+
{
9+
"name": "stderr",
10+
"output_type": "stream",
11+
"text": [
12+
"Using TensorFlow backend.\n",
13+
"/Users/vanpelt/.pyenv/versions/3.6.4/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
14+
" return f(*args, **kwds)\n",
15+
"/Users/vanpelt/.pyenv/versions/3.6.4/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
16+
" return f(*args, **kwds)\n"
17+
]
18+
}
19+
],
20+
"source": [
21+
"from keras import backend as K\n",
22+
"import numpy as np"
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": 6,
28+
"metadata": {},
29+
"outputs": [
30+
{
31+
"name": "stdout",
32+
"output_type": "stream",
33+
"text": [
34+
"Tensor(\"mul:0\", shape=(), dtype=float32)\n"
35+
]
36+
}
37+
],
38+
"source": [
39+
"x = K.variable(value=2)\n",
40+
"y = K.variable(value=4)\n",
41+
"print(x*y)"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": 7,
47+
"metadata": {},
48+
"outputs": [
49+
{
50+
"name": "stdout",
51+
"output_type": "stream",
52+
"text": [
53+
"8.0\n"
54+
]
55+
}
56+
],
57+
"source": [
58+
"print(K.eval(x*y))"
59+
]
60+
},
61+
{
62+
"cell_type": "code",
63+
"execution_count": null,
64+
"metadata": {},
65+
"outputs": [],
66+
"source": []
67+
}
68+
],
69+
"metadata": {
70+
"kernelspec": {
71+
"display_name": "Python 3",
72+
"language": "python",
73+
"name": "python3"
74+
},
75+
"language_info": {
76+
"codemirror_mode": {
77+
"name": "ipython",
78+
"version": 3
79+
},
80+
"file_extension": ".py",
81+
"mimetype": "text/x-python",
82+
"name": "python",
83+
"nbconvert_exporter": "python",
84+
"pygments_lexer": "ipython3",
85+
"version": "3.6.4"
86+
}
87+
},
88+
"nbformat": 4,
89+
"nbformat_minor": 2
90+
}

0 commit comments

Comments
 (0)