diff --git a/models/train-embeddings-rnn-100-length.h5 b/models/train-embeddings-rnn-100-length.h5 index f6f4c3c..0a69528 100644 Binary files a/models/train-embeddings-rnn-100-length.h5 and b/models/train-embeddings-rnn-100-length.h5 differ diff --git a/models/train-embeddings-rnn-20-length.h5 b/models/train-embeddings-rnn-20-length.h5 new file mode 100644 index 0000000..8a48ca8 Binary files /dev/null and b/models/train-embeddings-rnn-20-length.h5 differ diff --git a/notebooks/Writing Patents Revised.ipynb b/notebooks/Writing Patents Revised.ipynb index 35a2287..ac5e08d 100644 --- a/notebooks/Writing Patents Revised.ipynb +++ b/notebooks/Writing Patents Revised.ipynb @@ -3112,9 +3112,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 83, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "47574/47574 [==============================] - 7s 138us/step\n", + "Cross Entropy: 5.1231\n", + "Accuracy: 24.31%\n" + ] + } + ], "source": [ "model_name = 'train-embeddings-rnn-100-length'\n", "callbacks = make_callbacks(model_name)\n", @@ -3134,9 +3144,49 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 84, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "

Seed Sequence

device includes: at least one synapse blocks containing: a plurality of synapses for performing weight calculation on input signals to obtain output signals, which are arranged in planar array defined by a first and a second directions input signal lines for transmitting the input signals to the synapses, arranged along the first direction and output signal lines for transmitting the output signal from the synapses, arranged along the second direction not identical to the first direction at least one input neuron blocks containing a plurality of neurons to be connected with the input signal lines and at
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 84, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/html": [ + "

RNN Generated

< --- > an controlled feedback data and that respective steady variation for the training of variables in the activity of a
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 84, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/html": [ + "

Actual

< --- > least one output neuron blocks containing a plurality of neurons to be connected with the output signal lines.
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 84, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "seed_html, gen_html, a_html = generate_output(\n", " model, sequences, TRAINING_LENGTH, diversity=1.5)\n", @@ -3154,9 +3204,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 85, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There are 16210 unique words.\n", + "There are 426028 training sequences.\n" + ] + } + ], "source": [ "clear_memory()\n", "TRAINING_LENGTH = 20\n", @@ -3168,9 +3227,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 86, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There were 6334 words without pre-trained embeddings.\n" + ] + } + ], "source": [ "embedding_matrix = np.zeros((num_words, len(word_lookup['the'])))\n", "\n", @@ -3191,9 +3258,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 87, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "((298219, 20), (298219, 16210))" + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "X_train, X_valid, y_train, y_valid = create_train_valid(\n", " features, labels, num_words)\n", @@ -3202,18 +3280,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 88, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Object: y_train \tSize: 4.834130102 GB.\n", + "Object: y_valid \tSize: 2.071784002 GB.\n" + ] + } + ], "source": [ "check_sizes()" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 89, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "127809/127809 [==============================] - 14s 108us/step\n", + "Cross Entropy: 4.59\n", + "Accuracy: 26.88%\n" + ] + } + ], "source": [ "model = make_word_level_model(\n", " num_words,\n", @@ -3240,9 +3337,49 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 90, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "

Seed Sequence

and the other value is zero, created simply with an open circuit. Values for the T.sub.ij
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/html": [ + "

RNN Generated

< --- > and a pulse signal most in the derived value provided with the amplified and charges in a competition amplifier for outputting a power function of the weight voltage and and for the first layer
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/html": [ + "

Actual

< --- > terms of the clipped T matrix are obtained through an iterative process which operates on the clipped and nonclipped matrices and minimizes the error resulting from the use of the clipped T matrix.
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "seed_html, gen_html, a_html = generate_output(\n", " model, sequences, TRAINING_LENGTH, diversity=0.75)\n", @@ -3253,9 +3390,49 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 91, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "

Seed Sequence

a run time mode of operation. Information as to the status of the one or more expansion valves is
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/html": [ + "

RNN Generated

< --- > under one of the neural network and at least one of the subject which
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/html": [ + "

Actual

< --- > made available for real time assessment during the run time mode of operation.
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "seed_html, gen_html, a_html = generate_output(\n", " model, sequences, TRAINING_LENGTH, diversity=0.8)\n", @@ -3273,7 +3450,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 92, "metadata": {}, "outputs": [], "source": [ @@ -3328,18 +3505,70 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 93, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Seed Sequence: then performed to provide optimized machining parameters for improved rate of material removal and tool life. Optionally, a two-stage artificial neural network may be supplementally employed, wherein a first stage of the network provides output parameters including peak tool temperature and cutting forces in X and Y\n", + "\n", + "\n", + "\n", + "Option 1 < --- > contact fluid signals based on the filtered sensor. The neural network is instantiated domain for time depending on predetermined results from\n", + "\n", + "\n", + "Option 2 < --- > directions, for a combination of input reference parameters including tool rake angle, material cutting speed, and feed rate.\n", + "\n", + "\n", + "Option 3 < --- > voltage circuits having components from the spike signal, and perturbations corresponding to a similarity evaluation coefficient which is non-linearly differentiated.\n", + "\n", + "\n", + "Enter option you think is human (1-3): 2\n", + "\n", + "\n", + "Correct\n", + "Correct Ordering ['c1', 'h', 'c0']\n", + "Diversity 0.94\n" + ] + } + ], "source": [ "guess_human(model, sequences)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 94, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Seed Sequence: parameter configurations. The parameter configurations may include one or more of a variety of parameters, such as electrode configurations defining electrode combinations and polarities for an electrode set implanted in a patient. The electrode set may be carried by one or more implanted leads that are electrically\n", + "\n", + "\n", + "\n", + "Option 1 < --- > coupled to the neurostimulator. In operation, the programming device executes a parameter configuration search algorithm to guide the clinician in the selection of parameter configurations. The search algorithm relies on a neural network that identifies potential optimum parameter configurations.\n", + "\n", + "\n", + "Option 2 < --- > evaluated in said magnetic plane. An neuron is therefore a structure for which each presents of the neural network element of the artificial neural network using a partial article, a laser transducer for neural network circuits and a programmable matrix so\n", + "\n", + "\n", + "Option 3 < --- > applied to the amplifiers, preferably not on a feedback at the configurable cell. Plural oscillators are received to said neurons by the post-synaptic spike emitting light into a predetermined independent location. In another, a different neuron elements function may\n", + "\n", + "\n", + "Enter option you think is human (1-3): 1\n", + "\n", + "\n", + "Correct\n", + "Correct Ordering ['h', 'c1', 'c0']\n", + "Diversity 1.08\n" + ] + } + ], "source": [ "guess_human(model, sequences)" ] @@ -3376,9 +3605,50 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 95, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(2048, 20)" + ] + }, + "execution_count": 95, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/plain": [ + "(2048, 16210)" + ] + }, + "execution_count": 95, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/plain": [ + "145" + ] + }, + "execution_count": 95, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/plain": [ + "62" + ] + }, + "execution_count": 95, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "def data_gen(sequences, labels, batch_size, num_words):\n", " \"\"\"Yield batches for training\"\"\"\n", @@ -3447,7 +3717,16 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Epoch 1/2\n", + " 5/145 [>.............................] - ETA: 4:56 - loss: 3.7172 - acc: 0.3014" + ] + } + ], "source": [ "history = model.fit_generator(\n", " train_gen,\n",