Skip to content

Commit 008752d

Browse files
committed
fix training issue
1 parent 43f0124 commit 008752d

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

train.ipynb

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@
66
"metadata": {},
77
"outputs": [],
88
"source": [
9-
"%%bash\n",
10-
"\n",
11-
"pip install -U \"tensorflow~=2.0\" \"tensorflow-hub[make_image_classifier]~=0.6\"\n",
12-
"\n",
13-
"make_image_classifier \\\n",
9+
"!pip install \"tensorflow~=2.0\" \"tensorflow-hub[make_image_classifier]~=0.6\""
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"!make_image_classifier \\\n",
1419
" --image_dir data \\\n",
1520
" --tfhub_module https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4 \\\n",
1621
" --image_size 224 \\\n",
@@ -25,9 +30,16 @@
2530
" --l1_regularizer=0.0 \\\n",
2631
" --l2_regularizer=0.0001 \\\n",
2732
" --label_smoothing=0.1 \\\n",
28-
" --validation_split=0.2\n",
29-
"\n",
30-
"mv labels.txt model"
33+
" --validation_split=0.2"
34+
]
35+
},
36+
{
37+
"cell_type": "code",
38+
"execution_count": null,
39+
"metadata": {},
40+
"outputs": [],
41+
"source": [
42+
"!mv labels.txt model"
3143
]
3244
}
3345
],
@@ -52,4 +64,4 @@
5264
},
5365
"nbformat": 4,
5466
"nbformat_minor": 4
55-
}
67+
}

0 commit comments

Comments
 (0)