Skip to content

Commit 9c31b4c

Browse files
committed
Add .md and .ipynb
1 parent 692c028 commit 9c31b4c

File tree

8 files changed

+125054
-238
lines changed

8 files changed

+125054
-238
lines changed
Loading
Loading
Loading
Loading
Loading
Loading

examples/vision/ipynb/vit_small_ds.ipynb

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
{
6969
"cell_type": "code",
70-
"execution_count": 0,
70+
"execution_count": null,
7171
"metadata": {
7272
"colab_type": "code"
7373
},
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"cell_type": "code",
100-
"execution_count": 0,
100+
"execution_count": null,
101101
"metadata": {
102102
"colab_type": "code"
103103
},
@@ -126,7 +126,7 @@
126126
},
127127
{
128128
"cell_type": "code",
129-
"execution_count": 0,
129+
"execution_count": null,
130130
"metadata": {
131131
"colab_type": "code"
132132
},
@@ -182,7 +182,7 @@
182182
},
183183
{
184184
"cell_type": "code",
185-
"execution_count": 0,
185+
"execution_count": null,
186186
"metadata": {
187187
"colab_type": "code"
188188
},
@@ -229,7 +229,7 @@
229229
},
230230
{
231231
"cell_type": "code",
232-
"execution_count": 0,
232+
"execution_count": null,
233233
"metadata": {
234234
"colab_type": "code"
235235
},
@@ -324,8 +324,7 @@
324324
" else:\n",
325325
" # Linearly project the flat patches\n",
326326
" tokens = self.projection(flat_patches)\n",
327-
" return (tokens, patches)\n",
328-
""
327+
" return (tokens, patches)\n"
329328
]
330329
},
331330
{
@@ -339,7 +338,7 @@
339338
},
340339
{
341340
"cell_type": "code",
342-
"execution_count": 0,
341+
"execution_count": null,
343342
"metadata": {
344343
"colab_type": "code"
345344
},
@@ -402,7 +401,7 @@
402401
},
403402
{
404403
"cell_type": "code",
405-
"execution_count": 0,
404+
"execution_count": null,
406405
"metadata": {
407406
"colab_type": "code"
408407
},
@@ -423,8 +422,7 @@
423422
" def call(self, encoded_patches):\n",
424423
" encoded_positions = self.position_embedding(self.positions)\n",
425424
" encoded_patches = encoded_patches + encoded_positions\n",
426-
" return encoded_patches\n",
427-
""
425+
" return encoded_patches\n"
428426
]
429427
},
430428
{
@@ -472,7 +470,7 @@
472470
},
473471
{
474472
"cell_type": "code",
475-
"execution_count": 0,
473+
"execution_count": null,
476474
"metadata": {
477475
"colab_type": "code"
478476
},
@@ -496,8 +494,7 @@
496494
" attention_output = tf.einsum(\n",
497495
" self._combine_equation, attention_scores_dropout, value\n",
498496
" )\n",
499-
" return attention_output, attention_scores\n",
500-
""
497+
" return attention_output, attention_scores\n"
501498
]
502499
},
503500
{
@@ -511,7 +508,7 @@
511508
},
512509
{
513510
"cell_type": "code",
514-
"execution_count": 0,
511+
"execution_count": null,
515512
"metadata": {
516513
"colab_type": "code"
517514
},
@@ -541,7 +538,7 @@
541538
},
542539
{
543540
"cell_type": "code",
544-
"execution_count": 0,
541+
"execution_count": null,
545542
"metadata": {
546543
"colab_type": "code"
547544
},
@@ -589,8 +586,7 @@
589586
" logits = layers.Dense(NUM_CLASSES)(features)\n",
590587
" # Create the Keras model.\n",
591588
" model = keras.Model(inputs=inputs, outputs=logits)\n",
592-
" return model\n",
593-
""
589+
" return model\n"
594590
]
595591
},
596592
{
@@ -604,7 +600,7 @@
604600
},
605601
{
606602
"cell_type": "code",
607-
"execution_count": 0,
603+
"execution_count": null,
608604
"metadata": {
609605
"colab_type": "code"
610606
},
@@ -754,4 +750,4 @@
754750
},
755751
"nbformat": 4,
756752
"nbformat_minor": 0
757-
}
753+
}

0 commit comments

Comments
 (0)