14
14
"execution_count" : 1 ,
15
15
"metadata" : {
16
16
"pycharm" : {
17
+ "is_executing" : true ,
17
18
"name" : " #%%\n "
18
19
}
19
20
},
39
40
"execution_count" : 2 ,
40
41
"metadata" : {
41
42
"pycharm" : {
43
+ "is_executing" : true ,
42
44
"name" : " #%%\n "
43
45
}
44
46
},
47
49
"name" : " stdout" ,
48
50
"output_type" : " stream" ,
49
51
"text" : [
50
- " [[[0. 0. 0. ... 0. 0. 0.]\n " ,
51
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
52
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
53
- " ...\n " ,
54
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
55
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
56
- " [0. 0. 0. ... 0. 0. 0.]]\n " ,
52
+ " (60000, 28, 28)\n " ,
57
53
" \n " ,
58
- " [[0. 0. 0. ... 0. 0. 0.]\n " ,
59
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
60
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
61
- " ...\n " ,
62
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
63
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
64
- " [0. 0. 0. ... 0. 0. 0.]]\n " ,
65
- " \n " ,
66
- " [[0. 0. 0. ... 0. 0. 0.]\n " ,
67
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
68
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
69
- " ...\n " ,
70
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
71
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
72
- " [0. 0. 0. ... 0. 0. 0.]]\n " ,
73
- " \n " ,
74
- " ...\n " ,
75
- " \n " ,
76
- " [[0. 0. 0. ... 0. 0. 0.]\n " ,
77
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
78
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
79
- " ...\n " ,
80
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
81
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
82
- " [0. 0. 0. ... 0. 0. 0.]]\n " ,
83
- " \n " ,
84
- " [[0. 0. 0. ... 0. 0. 0.]\n " ,
85
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
86
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
87
- " ...\n " ,
88
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
89
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
90
- " [0. 0. 0. ... 0. 0. 0.]]\n " ,
91
- " \n " ,
92
- " [[0. 0. 0. ... 0. 0. 0.]\n " ,
93
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
94
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
95
- " ...\n " ,
96
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
97
- " [0. 0. 0. ... 0. 0. 0.]\n " ,
98
- " [0. 0. 0. ... 0. 0. 0.]]]\n " ,
99
- " \n " ,
100
- " [5 0 4 ... 5 6 8]\n "
54
+ " (60000,)\n "
101
55
]
102
56
}
103
57
],
106
60
" (images, labels), _ = mnist.load_data()\n " ,
107
61
" images = images / 255.0\n " ,
108
62
" \n " ,
109
- " print(images)\n " ,
63
+ " print(images.shape )\n " ,
110
64
" print()\n " ,
111
- " print(labels)"
65
+ " print(labels.shape )"
112
66
]
113
67
},
114
68
{
128
82
"execution_count" : 3 ,
129
83
"metadata" : {
130
84
"pycharm" : {
85
+ "is_executing" : true ,
131
86
"name" : " #%%\n "
132
87
}
133
88
},
175
130
"execution_count" : 4 ,
176
131
"metadata" : {
177
132
"pycharm" : {
133
+ "is_executing" : true ,
178
134
"name" : " #%%\n "
179
135
}
180
136
},
199
155
"execution_count" : 5 ,
200
156
"metadata" : {
201
157
"pycharm" : {
158
+ "is_executing" : true ,
202
159
"name" : " #%%\n "
203
160
}
204
161
},
209
166
"text" : [
210
167
" ArraySchema(\n " ,
211
168
" domain=Domain(*[\n " ,
212
- " Dim(name='dim_0', domain=(0, 59999), tile=64 , dtype='int32'),\n " ,
213
- " Dim(name='dim_1', domain=(0, 27), tile=28 , dtype='int32'),\n " ,
214
- " Dim(name='dim_2', domain=(0, 27), tile=28 , dtype='int32'),\n " ,
169
+ " Dim(name='dim_0', domain=(0, 59999), tile='64' , dtype='int32'),\n " ,
170
+ " Dim(name='dim_1', domain=(0, 27), tile='28' , dtype='int32'),\n " ,
171
+ " Dim(name='dim_2', domain=(0, 27), tile='28' , dtype='int32'),\n " ,
215
172
" ]),\n " ,
216
173
" attrs=[\n " ,
217
174
" Attr(name='features', dtype='float64', var=False, nullable=False),\n " ,
225
182
" \n " ,
226
183
" ArraySchema(\n " ,
227
184
" domain=Domain(*[\n " ,
228
- " Dim(name='dim_0', domain=(0, 59999), tile=64 , dtype='int32'),\n " ,
185
+ " Dim(name='dim_0', domain=(0, 59999), tile='64' , dtype='int32'),\n " ,
229
186
" ]),\n " ,
230
187
" attrs=[\n " ,
231
188
" Attr(name='features', dtype='uint8', var=False, nullable=False),\n " ,
262
219
"execution_count" : 6 ,
263
220
"metadata" : {
264
221
"pycharm" : {
222
+ "is_executing" : true ,
265
223
"name" : " #%%\n "
266
224
}
267
225
},
268
226
"outputs" : [
269
227
{
270
228
"data" : {
271
229
"text/plain" : [
272
- " <matplotlib.image.AxesImage at 0x17ec58e50 >"
230
+ " <matplotlib.image.AxesImage at 0x175806510 >"
273
231
]
274
232
},
275
233
"execution_count" : 6 ,
311
269
"execution_count" : 7 ,
312
270
"metadata" : {
313
271
"pycharm" : {
272
+ "is_executing" : true ,
314
273
"name" : " #%%\n "
315
274
}
316
275
},
349
308
"execution_count" : 8 ,
350
309
"metadata" : {
351
310
"pycharm" : {
311
+ "is_executing" : true ,
352
312
"name" : " #%%\n "
353
313
}
354
314
},
358
318
"output_type" : " stream" ,
359
319
"text" : [
360
320
" Epoch 1/5\n " ,
361
- " 938/938 [==============================] - 2s 1ms /step - loss: 0.3529 - accuracy: 0.8979 \n " ,
321
+ " 938/938 [==============================] - 8s 8ms /step - loss: 0.3498 - accuracy: 0.9007 \n " ,
362
322
" Epoch 2/5\n " ,
363
- " 938/938 [==============================] - 1s 1ms /step - loss: 0.1695 - accuracy: 0.9502 \n " ,
323
+ " 938/938 [==============================] - 7s 8ms /step - loss: 0.1682 - accuracy: 0.9505 \n " ,
364
324
" Epoch 3/5\n " ,
365
- " 938/938 [==============================] - 1s 1ms /step - loss: 0.1255 - accuracy: 0.9633 \n " ,
325
+ " 938/938 [==============================] - 7s 8ms /step - loss: 0.1260 - accuracy: 0.9629 \n " ,
366
326
" Epoch 4/5\n " ,
367
- " 938/938 [==============================] - 1s 995us /step - loss: 0.1036 - accuracy: 0.9683 \n " ,
327
+ " 938/938 [==============================] - 7s 8ms /step - loss: 0.1028 - accuracy: 0.9697 \n " ,
368
328
" Epoch 5/5\n " ,
369
- " 938/938 [==============================] - 1s 1ms /step - loss: 0.0847 - accuracy: 0.9743 \n "
329
+ " 938/938 [==============================] - 8s 8ms /step - loss: 0.0853 - accuracy: 0.9746 \n "
370
330
]
371
331
}
372
332
],
375
335
" \n " ,
376
336
" with tiledb.open('training_images') as x, tiledb.open('training_labels') as y:\n " ,
377
337
" tiledb_dataset = TensorflowTileDBDenseDataset(\n " ,
378
- " x_array=x, y_array=y, batch_size=64\n " ,
338
+ " x_array=x, y_array=y, x_attribute_names=['features'], y_attribute_names=['features'], batch_size=64\n " ,
379
339
" )\n " ,
380
340
" \n " ,
381
341
" model.fit(tiledb_dataset, epochs=5)"
386
346
"execution_count" : 9 ,
387
347
"metadata" : {
388
348
"pycharm" : {
349
+ "is_executing" : true ,
389
350
"name" : " #%%\n "
390
351
}
391
352
},
420
381
{
421
382
"cell_type" : " code" ,
422
383
"execution_count" : null ,
423
- "metadata" : {},
384
+ "metadata" : {
385
+ "pycharm" : {
386
+ "is_executing" : true
387
+ }
388
+ },
424
389
"outputs" : [],
425
390
"source" : []
426
391
}
446
411
},
447
412
"nbformat" : 4 ,
448
413
"nbformat_minor" : 1
449
- }
414
+ }
0 commit comments