"git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "0ee8c0a8dbfb6453919481660d411c7ff6ca8f54"
Commit 957ee975 authored by Mark Daoust's avatar Mark Daoust
Browse files

Resolve review comments - part 1

parent 66df4538
......@@ -356,14 +356,12 @@
"source": [
"ds = easy_input_function(train_df, label_key='income_bracket', num_epochs=5, shuffle=True, batch_size=10)\n",
"\n",
"for feature_batch, label_batch in ds:\n",
" break\n",
" \n",
"print('Some feature keys:', list(feature_batch.keys())[:5])\n",
"print()\n",
"print('A batch of Ages :', feature_batch['age'])\n",
"print()\n",
"print('A batch of Labels:', label_batch )"
"for feature_batch, label_batch in ds.take(1):\n",
" print('Some feature keys:', list(feature_batch.keys())[:5])\n",
" print()\n",
" print('A batch of Ages :', feature_batch['age'])\n",
" print()\n",
" print('A batch of Labels:', label_batch )"
],
"execution_count": 0,
"outputs": []
......@@ -426,14 +424,12 @@
},
"cell_type": "code",
"source": [
"for feature_batch, label_batch in ds:\n",
" break\n",
" \n",
"print('Feature keys:', list(feature_batch.keys())[:5])\n",
"print()\n",
"print('Age batch :', feature_batch['age'])\n",
"print()\n",
"print('Label batch :', label_batch )"
"for feature_batch, label_batch in ds.take(1):\n",
" print('Feature keys:', list(feature_batch.keys())[:5])\n",
" print()\n",
" print('Age batch :', feature_batch['age'])\n",
" print()\n",
" print('Label batch :', label_batch )"
],
"execution_count": 0,
"outputs": []
......@@ -546,7 +542,7 @@
},
"cell_type": "code",
"source": [
"classifier = tf.estimator.LinearClassifier(feature_columns=[age], n_classes=2)\n",
"classifier = tf.estimator.LinearClassifier(feature_columns=[age])\n",
"classifier.train(train_inpf)\n",
"result = classifier.evaluate(test_inpf)\n",
"\n",
......@@ -627,7 +623,7 @@
},
"cell_type": "code",
"source": [
"classifier = tf.estimator.LinearClassifier(feature_columns=my_numeric_columns, n_classes=2)\n",
"classifier = tf.estimator.LinearClassifier(feature_columns=my_numeric_columns)\n",
"classifier.train(train_inpf)\n",
"\n",
"result = classifier.evaluate(test_inpf)\n",
......@@ -876,7 +872,7 @@
},
"cell_type": "code",
"source": [
"classifier = tf.estimator.LinearClassifier(feature_columns=my_numeric_columns+my_categorical_columns, n_classes=2)\n",
"classifier = tf.estimator.LinearClassifier(feature_columns=my_numeric_columns+my_categorical_columns)\n",
"classifier.train(train_inpf)\n",
"result = classifier.evaluate(test_inpf)\n",
"\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment