Skip to content

Commit

Permalink
nblint nbfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyaspiridonov authored and joefernandez committed Apr 18, 2024
1 parent 6374e4f commit 8d44cba
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 70 deletions.
92 changes: 23 additions & 69 deletions site/ja/datasets/overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
"cellView": "both",
"id": "boeZp0sYbO41"
},
"outputs": [

],
"outputs": [],
"source": [
"!pip install -q tfds-nightly tensorflow matplotlib"
]
Expand All @@ -74,9 +72,7 @@
"metadata": {
"id": "TTBSvHcSLBzc"
},
"outputs": [

],
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -102,9 +98,7 @@
"metadata": {
"id": "FAvbSVzjLCIb"
},
"outputs": [

],
"outputs": [],
"source": [
"tfds.list_builders()"
]
Expand All @@ -131,9 +125,7 @@
"metadata": {
"id": "dCou80mnLLPV"
},
"outputs": [

],
"outputs": [],
"source": [
"ds = tfds.load('mnist', split='train', shuffle_files=True)\n",
"assert isinstance(ds, tf.data.Dataset)\n",
Expand Down Expand Up @@ -172,9 +164,7 @@
"metadata": {
"id": "2zN_jQ2ER40W"
},
"outputs": [

],
"outputs": [],
"source": [
"builder = tfds.builder('mnist')\n",
"# 1. Create the tfrecord files (no-op if already exists)\n",
Expand Down Expand Up @@ -220,9 +210,7 @@
"metadata": {
"id": "JAGjXdk_bIYQ"
},
"outputs": [

],
"outputs": [],
"source": [
"ds = tfds.load('mnist', split='train')\n",
"ds = ds.take(1) # Only take a single example\n",
Expand Down Expand Up @@ -260,9 +248,7 @@
"metadata": {
"id": "nJ4O0xy3djfV"
},
"outputs": [

],
"outputs": [],
"source": [
"ds = tfds.load('mnist', split='train', as_supervised=True)\n",
"ds = ds.take(1)\n",
Expand Down Expand Up @@ -291,9 +277,7 @@
"metadata": {
"id": "tzQTCUkAfe9R"
},
"outputs": [

],
"outputs": [],
"source": [
"ds = tfds.load('mnist', split='train', as_supervised=True)\n",
"ds = ds.take(1)\n",
Expand Down Expand Up @@ -321,9 +305,7 @@
"metadata": {
"id": "Gg8BNsv-UzFl"
},
"outputs": [

],
"outputs": [],
"source": [
"image, label = tfds.as_numpy(tfds.load(\n",
" 'mnist',\n",
Expand Down Expand Up @@ -361,9 +343,7 @@
"metadata": {
"id": "ZyQzZ98bX3dM"
},
"outputs": [

],
"outputs": [],
"source": [
"ds = tfds.load('mnist', split='train')\n",
"ds = ds.batch(32).prefetch(1)\n",
Expand Down Expand Up @@ -420,9 +400,7 @@
"metadata": {
"id": "FKouwN_yVSGQ"
},
"outputs": [

],
"outputs": [],
"source": [
"ds, info = tfds.load('mnist', split='train', with_info=True)\n",
"\n",
Expand All @@ -446,9 +424,7 @@
"metadata": {
"id": "DpE2FD56cSQR"
},
"outputs": [

],
"outputs": [],
"source": [
"ds, info = tfds.load('mnist', split='train', with_info=True)\n",
"\n",
Expand Down Expand Up @@ -476,9 +452,7 @@
"metadata": {
"id": "UgLgtcd1ljzt"
},
"outputs": [

],
"outputs": [],
"source": [
"ds, info = tfds.load('mnist', with_info=True)"
]
Expand All @@ -498,9 +472,7 @@
"metadata": {
"id": "nmq97QkilxeL"
},
"outputs": [

],
"outputs": [],
"source": [
"builder = tfds.builder('mnist')\n",
"info = builder.info"
Expand All @@ -521,9 +493,7 @@
"metadata": {
"id": "O-wLIKD-mZQT"
},
"outputs": [

],
"outputs": [],
"source": [
"print(info)"
]
Expand All @@ -545,9 +515,7 @@
"metadata": {
"id": "RcyZXncqoFab"
},
"outputs": [

],
"outputs": [],
"source": [
"info.features"
]
Expand All @@ -567,9 +535,7 @@
"metadata": {
"id": "HhfzBH6qowpz"
},
"outputs": [

],
"outputs": [],
"source": [
"print(info.features[\"label\"].num_classes)\n",
"print(info.features[\"label\"].names)\n",
Expand All @@ -592,9 +558,7 @@
"metadata": {
"id": "SergV_wQowLY"
},
"outputs": [

],
"outputs": [],
"source": [
"print(info.features.shape)\n",
"print(info.features.dtype)\n",
Expand All @@ -619,9 +583,7 @@
"metadata": {
"id": "FBbfwA8Sp4ax"
},
"outputs": [

],
"outputs": [],
"source": [
"print(info.splits)"
]
Expand All @@ -641,9 +603,7 @@
"metadata": {
"id": "fRBieOOquDzX"
},
"outputs": [

],
"outputs": [],
"source": [
"print(list(info.splits.keys()))"
]
Expand All @@ -663,9 +623,7 @@
"metadata": {
"id": "-h_OSpRsqKpP"
},
"outputs": [

],
"outputs": [],
"source": [
"print(info.splits['train'].num_examples)\n",
"print(info.splits['train'].filenames)\n",
Expand All @@ -687,9 +645,7 @@
"metadata": {
"id": "HO5irBZ3uIzQ"
},
"outputs": [

],
"outputs": [],
"source": [
"print(info.splits['train[15%:75%]'].num_examples)\n",
"print(info.splits['train[15%:75%]'].file_instructions)"
Expand Down Expand Up @@ -753,9 +709,7 @@
],
"metadata": {
"colab": {
"collapsed_sections": [

],
"collapsed_sections": [],
"name": "overview.ipynb",
"toc_visible": true
},
Expand Down
2 changes: 1 addition & 1 deletion site/ja/tutorials/generative/style_transfer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"source": [
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
" <td>\n",
"<img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\"><a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs-l10n/blob/master/site/ja/tutorials/generative/style_transfer.ipynb\">TensorFlow.org で表示</a> </td>\n",
"<img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\"><a target=\"_blank\" href=\"https://www.tensorflow.org/tutorials/generative/style_transfer\">TensorFlow.org で表示</a> </td>\n",
" <td>\n",
"<img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\"><a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs-l10n/blob/master/site/ja/tutorials/generative/style_transfer.ipynb\">Google Colab で実行</a> </td>\n",
" <td><a target=\"_blank\" href=\"https://github.com/tensorflow/docs-l10n/blob/master/site/ja/tutorials/generative/style_transfer.ipynb\"><img src=\"https://storage.googleapis.com/tensorflow_docs/docs-l10n/site/ja/tutorials/generative/style_transfer.ipynb\">GitHub でソースを表示</a></td>\n",
Expand Down

0 comments on commit 8d44cba

Please sign in to comment.