1444 lines
63 KiB
Plaintext
1444 lines
63 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"id": "ae46c64f",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pandas as pd\n",
|
|
"import numpy as np"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"id": "9e8036a2",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"delim = ';'\n",
|
|
"\n",
|
|
"base_path = '/opt/iui-datarelease1-sose2021/'\n",
|
|
"\n",
|
|
"Xpickle_file = './X.pickle'\n",
|
|
"\n",
|
|
"ypickle_file = './y.pickle'"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"id": "9be46372",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"THRESH = [70]\n",
|
|
"LEEWAY = [0]\n",
|
|
"EPOCH = [20, 30, 50]\n",
|
|
"\n",
|
|
"DENSE_COUNT = range(1,4)\n",
|
|
"DENSE_NEURONS = range(600, 2401, 600)\n",
|
|
"\n",
|
|
"DENSE2_COUNT = range(1,4)\n",
|
|
"DENSE2_NEURONS = range(600, 2401, 600)\n",
|
|
"\n",
|
|
"AVG_FROM = 30\n",
|
|
"\n",
|
|
"threshold_p = 0.99"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"id": "880c0975",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pickle\n",
|
|
"\n",
|
|
"def load_pickles():\n",
|
|
" _p = open(Xpickle_file, 'rb')\n",
|
|
" X = pickle.load(_p)\n",
|
|
" _p.close()\n",
|
|
" \n",
|
|
" _p = open(ypickle_file, 'rb')\n",
|
|
" y = pickle.load(_p)\n",
|
|
" _p.close()\n",
|
|
" \n",
|
|
" return (np.asarray(X, dtype=pd.DataFrame), np.asarray(y, dtype=str))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"id": "c550e984",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os\n",
|
|
"\n",
|
|
"def load_data():\n",
|
|
" if os.path.isfile(Xpickle_file) and os.path.isfile(ypickle_file):\n",
|
|
" return load_pickles()\n",
|
|
" data = []\n",
|
|
" label = []\n",
|
|
" for user in range(0, user_count):\n",
|
|
" user_path = base_path + str(user) + '/split_letters_csv/'\n",
|
|
" for file in os.listdir(user_path):\n",
|
|
" file_name = user_path + file\n",
|
|
" letter = ''.join(filter(lambda x: x.isalpha(), file))[0]\n",
|
|
" data.append(pd.read_csv(file_name, delim))\n",
|
|
" label.append(letter)\n",
|
|
" return (np.asarray(data, dtype=pd.DataFrame), np.asarray(label, dtype=str), np.asarray(file_name))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"id": "6856de47",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def shorten(npList, thresh, leeway):\n",
|
|
" temp = npList['Force']\n",
|
|
" \n",
|
|
" temps_over_T = np.where(temp > thresh)[0]\n",
|
|
" return npList[max(temps_over_T[0]-leeway,0):temps_over_T[-1]+leeway]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"id": "78eb6f3f",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from tensorflow.keras.preprocessing.sequence import pad_sequences\n",
|
|
"\n",
|
|
"def preproc(data, label, thresh, leeway):\n",
|
|
" #shorten\n",
|
|
" XX = np.array(list(map(shorten, data, [thresh for _ in range(len(data))], [leeway for _ in range(len(data))])),dtype=object)\n",
|
|
"\n",
|
|
" #filter\n",
|
|
" len_mask = np.where(np.asarray(list(map(len, XX))) <= int(pd.Series(np.asarray(list(map(len, XX)))).quantile(threshold_p)))\n",
|
|
" X_filter = XX[len_mask] \n",
|
|
" y_filter = label[len_mask]\n",
|
|
" \n",
|
|
" #drop millis\n",
|
|
" [x.drop(labels='Millis', axis=1) for x in X_filter]\n",
|
|
"\n",
|
|
" #pad\n",
|
|
" X_filter = pad_sequences(X_filter, dtype=float, padding='post')\n",
|
|
" \n",
|
|
" return (X_filter, y_filter)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"id": "e4b4925a",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import tensorflow as tf\n",
|
|
"from tensorflow.keras.models import Sequential\n",
|
|
"from tensorflow.keras.layers import Dense, Flatten, BatchNormalization\n",
|
|
"\n",
|
|
"def build_model(dcount, dnons, dcount2, dnons2, X_shape):\n",
|
|
" model = Sequential()\n",
|
|
"\n",
|
|
" model.add(BatchNormalization(input_shape=X_shape))\n",
|
|
" \n",
|
|
" model.add(Flatten())\n",
|
|
"\n",
|
|
" for i in range(dcount):\n",
|
|
" model.add(Dense(dnons, activation='relu'))\n",
|
|
" \n",
|
|
" for i in range(dcount2):\n",
|
|
" model.add(Dense(dnons2, activation='relu'))\n",
|
|
" \n",
|
|
" model.add(Dense(26, activation='softmax'))\n",
|
|
"\n",
|
|
" model.compile(\n",
|
|
" optimizer=tf.keras.optimizers.Adam(0.001),\n",
|
|
" loss=\"categorical_crossentropy\", \n",
|
|
" metrics=[\"acc\"],\n",
|
|
" )\n",
|
|
"\n",
|
|
" return model\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"id": "fc8caabb",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def get_avg_acc(X_train, y_train, X_test, y_test, epoch, dcount, dnons, dcount2, dnons2):\n",
|
|
" accs = []\n",
|
|
" for i in range(AVG_FROM):\n",
|
|
" model = build_model(dcount, dnons, dcount2, dnons2, X_train[0].shape)\n",
|
|
" model.fit(X_train, y_train, \n",
|
|
" epochs=epoch,\n",
|
|
" batch_size=128,\n",
|
|
" shuffle=True,\n",
|
|
" validation_data=(X_test, y_test),\n",
|
|
" verbose=0,\n",
|
|
" )\n",
|
|
" results = model.evaluate(X_test, y_test, batch_size=128, verbose=0)\n",
|
|
" accs.append((model,results[1]))\n",
|
|
" return np.mean(np.delete(accs,0,1).astype('float64'))\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"id": "6894af8f",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from sklearn.model_selection import train_test_split\n",
|
|
"from sklearn.preprocessing import LabelEncoder, LabelBinarizer\n",
|
|
"import tensorflow as tf\n",
|
|
"X, y = load_data()\n",
|
|
"result = pd.DataFrame({'Threshold': pd.Series([], dtype='int'),\n",
|
|
" 'Leeway': pd.Series([], dtype='int'),\n",
|
|
" 'Epoch': pd.Series([], dtype='int'),\n",
|
|
" 'DENSE_COUNT1': pd.Series([], dtype='int'),\n",
|
|
" 'DENSE_NEURON1': pd.Series([], dtype='int'),\n",
|
|
" 'DENSE_COUNT2': pd.Series([], dtype='int'),\n",
|
|
" 'DENSE_NEURON2': pd.Series([], dtype='int'),\n",
|
|
" 'Accuracy': pd.Series([], dtype='float')})"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"id": "a2e2840b",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# FIRST CELL: set these variables to limit GPU usage.\n",
|
|
"os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' # this is required\n",
|
|
"os.environ['CUDA_VISIBLE_DEVICES'] = '1' # set to '0' for GPU0, '1' for GPU1 or '2' for GPU2. Check \"gpustat\" in a terminal."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"id": "bfa164f1",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 76.83\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.67\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.85\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.80\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.19\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.89\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.72\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.04\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.24\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.49\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.35\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.62\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.26\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.00\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.84\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.82\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.73\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.04\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.02\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.30\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.06\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.31\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.44\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.24\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.21\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.88\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.46\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.99\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.13\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.58\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.19\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.35\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.37\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.53\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.48\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.07\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 76.76\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.73\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.93\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.75\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.17\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.36\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.51\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.98\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.27\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.48\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.62\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 1\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.13\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.97\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.89\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.77\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.82\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.92\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.13\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.94\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.08\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.92\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.00\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.61\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.48\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.17\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.35\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.19\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.38\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.83\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.21\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.31\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.23\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.54\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.53\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.14\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.81\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.81\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.33\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.43\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.58\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.42\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.58\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.44\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.18\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.42\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.40\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.09\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.56\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.10\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.49\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.24\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.00\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.61\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.68\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.00\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.21\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.99\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.20\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.88\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 2\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.83\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.78\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.93\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.98\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.02\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.04\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.59\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.97\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.55\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.38\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.40\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.10\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 600\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 76.91\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.61\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.61\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.44\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.40\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.46\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.59\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.17\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.02\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.15\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.58\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1200\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.02\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.60\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.39\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.58\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.49\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.37\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.45\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.02\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.69\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 77.95\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 77.59\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 77.53\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 1800\n",
|
|
" Dense Count 2: 3\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 77.26\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.33\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.39\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 1800\n",
|
|
"Accuracy: 78.46\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 1\n",
|
|
" Dense Neurons 2: 2400\n",
|
|
"Accuracy: 78.38\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 600\n",
|
|
"Accuracy: 78.62\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1200\n",
|
|
"Accuracy: 78.02\n",
|
|
"Testing with: Threshold: 70\n",
|
|
" Leeway: 0\n",
|
|
" Epoch: 20\n",
|
|
" Dense Count 1: 3\n",
|
|
" Dense Neurons 1: 2400\n",
|
|
" Dense Count 2: 2\n",
|
|
" Dense Neurons 2: 1800\n"
|
|
]
|
|
},
|
|
{
|
|
"ename": "KeyboardInterrupt",
|
|
"evalue": "",
|
|
"output_type": "error",
|
|
"traceback": [
|
|
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
|
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
|
"\u001b[0;32m<timed exec>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n",
|
|
"\u001b[0;32m<ipython-input-9-47e2893956f1>\u001b[0m in \u001b[0;36mget_avg_acc\u001b[0;34m(X_train, y_train, X_test, y_test, epoch, dcount, dnons, dcount2, dnons2)\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mAVG_FROM\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mmodel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbuild_model\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdcount\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdnons\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdcount2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdnons2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mX_train\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m model.fit(X_train, y_train, \n\u001b[0m\u001b[1;32m 6\u001b[0m \u001b[0mepochs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mepoch\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mbatch_size\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m128\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)\u001b[0m\n\u001b[1;32m 1129\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1130\u001b[0m steps_per_execution=self._steps_per_execution)\n\u001b[0;32m-> 1131\u001b[0;31m val_logs = self.evaluate(\n\u001b[0m\u001b[1;32m 1132\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mval_x\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1133\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mval_y\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py\u001b[0m in \u001b[0;36mevaluate\u001b[0;34m(self, x, y, batch_size, verbose, sample_weight, steps, callbacks, max_queue_size, workers, use_multiprocessing, return_dict)\u001b[0m\n\u001b[1;32m 1387\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mtrace\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTrace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'test'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstep_num\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_r\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1388\u001b[0m \u001b[0mcallbacks\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_test_batch_begin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1389\u001b[0;31m \u001b[0mtmp_logs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtest_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0miterator\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1390\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdata_handler\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshould_sync\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1391\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0masync_wait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, *args, **kwds)\u001b[0m\n\u001b[1;32m 826\u001b[0m \u001b[0mtracing_count\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexperimental_get_tracing_count\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 827\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mtrace\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTrace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_name\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mtm\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 828\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 829\u001b[0m \u001b[0mcompiler\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"xla\"\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_experimental_compile\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;34m\"nonXla\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 830\u001b[0m \u001b[0mnew_tracing_count\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexperimental_get_tracing_count\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, *args, **kwds)\u001b[0m\n\u001b[1;32m 860\u001b[0m \u001b[0;31m# In this case we have not created variables on the first call. So we can\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 861\u001b[0m \u001b[0;31m# run the first trace but we should fail if variables are created.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 862\u001b[0;31m \u001b[0mresults\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stateful_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 863\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_created_variables\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 864\u001b[0m raise ValueError(\"Creating variables on a non-first call to a function\"\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 2940\u001b[0m (graph_function,\n\u001b[1;32m 2941\u001b[0m filtered_flat_args) = self._maybe_define_function(args, kwargs)\n\u001b[0;32m-> 2942\u001b[0;31m return graph_function._call_flat(\n\u001b[0m\u001b[1;32m 2943\u001b[0m filtered_flat_args, captured_inputs=graph_function.captured_inputs) # pylint: disable=protected-access\n\u001b[1;32m 2944\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36m_call_flat\u001b[0;34m(self, args, captured_inputs, cancellation_manager)\u001b[0m\n\u001b[1;32m 1916\u001b[0m and executing_eagerly):\n\u001b[1;32m 1917\u001b[0m \u001b[0;31m# No tape is watching; skip to running the function.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1918\u001b[0;31m return self._build_call_outputs(self._inference_function.call(\n\u001b[0m\u001b[1;32m 1919\u001b[0m ctx, args, cancellation_manager=cancellation_manager))\n\u001b[1;32m 1920\u001b[0m forward_backward = self._select_forward_and_backward_functions(\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/eager/function.py\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self, ctx, args, cancellation_manager)\u001b[0m\n\u001b[1;32m 553\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0m_InterpolateFunctionError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 554\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcancellation_manager\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 555\u001b[0;31m outputs = execute.execute(\n\u001b[0m\u001b[1;32m 556\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msignature\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 557\u001b[0m \u001b[0mnum_outputs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_num_outputs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;32m/opt/jupyterhub/lib/python3.8/site-packages/tensorflow/python/eager/execute.py\u001b[0m in \u001b[0;36mquick_execute\u001b[0;34m(op_name, num_outputs, inputs, attrs, ctx, name)\u001b[0m\n\u001b[1;32m 57\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0mctx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mensure_initialized\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 59\u001b[0;31m tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,\n\u001b[0m\u001b[1;32m 60\u001b[0m inputs, attrs, num_outputs)\n\u001b[1;32m 61\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_NotOkStatusException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%time\n",
|
|
"\n",
|
|
"for t in THRESH:\n",
|
|
" for l in LEEWAY:\n",
|
|
" for e in EPOCH:\n",
|
|
" for dc in DENSE_COUNT:\n",
|
|
" for dn in DENSE_NEURONS:\n",
|
|
" for dc2 in DENSE2_COUNT:\n",
|
|
" for dn2 in DENSE2_NEURONS:\n",
|
|
" print(f\"Testing with: Threshold: {t}\")\n",
|
|
" print(f\" Leeway: {l}\")\n",
|
|
" print(f\" Epoch: {e}\")\n",
|
|
" print(f\" Dense Count 1: {dc}\")\n",
|
|
" print(f\" Dense Neurons 1: {dn}\")\n",
|
|
" print(f\" Dense Count 2: {dc2}\")\n",
|
|
" print(f\" Dense Neurons 2: {dn2}\")\n",
|
|
" Xp, yp = preproc(X, y, t, l)\n",
|
|
" lb = LabelBinarizer()\n",
|
|
"\n",
|
|
" ypt = lb.fit_transform(yp)\n",
|
|
" X_train, X_test, y_train, y_test = train_test_split(Xp, ypt, test_size=0.2, random_state=177013)\n",
|
|
" acc = get_avg_acc(X_train,y_train,X_test, y_test, e, dc,dn,dc2,dn2)\n",
|
|
" result = result.append({'Threshold': t,\n",
|
|
" 'Leeway': l,\n",
|
|
" 'Epoch': e,\n",
|
|
" 'DENSE_COUNT1': dc,\n",
|
|
" 'DENSE_NEURON1': dn,\n",
|
|
" 'DENSE_COUNT2': dc2,\n",
|
|
" 'DENSE_NEURON2': dn2,\n",
|
|
" 'Accuracy': acc}, ignore_index=True)\n",
|
|
" print(f\"Accuracy: {acc*100:.2f}\\n\\n\")\n",
|
|
" result.to_csv('results.csv', header=False)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"id": "aa37500d",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"result.to_csv('./results.csv')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"id": "c6216ab8",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"exit()"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.8.5"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|