Skip to content

Instantly share code, notes, and snippets.

@rxwei
Created March 11, 2019 10:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rxwei/ce6644efad8f229651050e096c05ccbb to your computer and use it in GitHub Desktop.
Save rxwei/ce6644efad8f229651050e096c05ccbb to your computer and use it in GitHub Desktop.
RNN.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "RNN.ipynb",
"version": "0.3.2",
"provenance": [],
"collapsed_sections": [],
"include_colab_link": true
},
"kernelspec": {
"name": "swift",
"display_name": "Swift"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/rxwei/ce6644efad8f229651050e096c05ccbb/rnn.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"metadata": {
"id": "kZRlD4utdPuX",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"import TensorFlow"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "atayDK-S7t_O",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"extension Layer {\n",
" typealias Backpropagator = (Output.CotangentVector) -> (layerGradient: CotangentVector,\n",
" inputGradient: Input.CotangentVector)\n",
"}"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "yRB6kCjyzEIq",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"public struct RNNCell<Scalar: TensorFlowFloatingPoint>: Layer {\n",
" public var dense0: Dense<Scalar>\n",
" public var dense1: Dense<Scalar>\n",
" \n",
" public struct Input: VectorNumeric, Differentiable {\n",
" public var x: Tensor<Scalar>\n",
" public var h: Tensor<Scalar>\n",
" \n",
" @differentiable\n",
" public init(x: Tensor<Scalar>, h: Tensor<Scalar>) {\n",
" self.x = x\n",
" self.h = h\n",
" }\n",
" }\n",
" \n",
" public struct Output: VectorNumeric, Differentiable {\n",
" public var h: Tensor<Scalar>\n",
" public var y: Tensor<Scalar>\n",
" \n",
" @differentiable\n",
" public init(h: Tensor<Scalar>, y: Tensor<Scalar>) {\n",
" self.h = h\n",
" self.y = y\n",
" }\n",
" }\n",
" \n",
" public init(hiddenSize: Int, \n",
" hiddenActivation: @escaping Dense<Scalar>.Activation = tanh,\n",
" outputActivation: @escaping Dense<Scalar>.Activation = tanh) {\n",
" dense0 = Dense(inputSize: hiddenSize + hiddenSize, outputSize: hiddenSize, \n",
" activation: hiddenActivation)\n",
" dense1 = Dense(inputSize: hiddenSize, outputSize: hiddenSize,\n",
" activation: outputActivation)\n",
" }\n",
" \n",
" @differentiable\n",
" public func applied(to input: Input, in context: Context) -> Output {\n",
" let x = input.x.concatenated(with: input.h, alongAxis: 1)\n",
" let newH = dense0.applied(to: x, in: context)\n",
" let y = dense1.applied(to: newH, in: context)\n",
" return Output(h: newH, y: y)\n",
" }\n",
"}"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "Mks0n3gp1qpA",
"colab_type": "code",
"outputId": "cf1bf974-5b77-4957-f5bb-dd7022a1fa4b",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 94
}
},
"cell_type": "code",
"source": [
"var xx: [Tensor<Float>] = []\n",
"for _ in 0..<10 {\n",
" xx.append(Tensor<Float>(randomUniform: [1, 10]))\n",
"}\n",
"print(xx)\n",
"\n",
"var yy: [Tensor<Float>] = []\n",
"for _ in 0..<10 {\n",
" yy.append(Tensor<Float>(randomUniform: [1, 10]))\n",
"}\n",
"print(yy)"
],
"execution_count": 0,
"outputs": [
{
"output_type": "stream",
"text": [
"[[[0.7460892, 0.32802844, 0.3952359, 0.5388552, 0.5410385, 0.10391033, 0.68464065, 0.42201507, 0.98308325, 0.31244147]], [[0.49071646, 0.47137547, 0.07676065, 0.5364661, 0.52186453, 0.7432296, 0.045749187, 0.7719697, 0.88734746, 0.5440532]], [[0.97221494, 0.42977142, 0.5083407, 0.90804136, 0.84189224, 0.22561407, 0.3411585, 0.17296696, 0.65451574, 0.48572707]], [[0.32681143, 0.25209665, 0.7244133, 0.8722036, 0.81509614, 0.03797543, 0.6829469, 0.98696077, 0.64249635, 0.67511714]], [[0.82387996, 0.35361278, 0.7506225, 0.16291165, 0.98055196, 0.10242045, 0.22385573, 0.20574474, 0.67323196, 0.5967969]], [[0.54163957, 0.8711827, 0.8109065, 0.17164207, 0.09654236, 0.16454983, 0.071976066, 0.91401374, 0.19005239, 0.6036613]], [[0.7298938, 0.8244046, 0.24479246, 0.5072886, 0.9622613, 0.97354245, 0.2809584, 0.33045483, 0.80928504, 0.2654426]], [[0.22225761, 0.30337286, 0.93456244, 0.4297464, 0.82484436, 0.2272898, 0.26797116, 0.21186495, 0.578953, 0.27410078]], [[0.7611792, 0.6609969, 0.7271217, 0.9938983, 0.13140988, 0.18925488, 0.7295034, 0.6154586, 0.36278677, 0.95169437]], [[0.403504, 0.4604323, 0.97269034, 0.26011527, 0.87800336, 0.7899717, 0.20973647, 0.07857883, 0.1157558, 0.39126587]]]\r\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "b1LJYBq65Rp-",
"colab_type": "code",
"outputId": "dd08ca81-56f8-4dcb-b4f3-17767751cf1e",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 187
}
},
"cell_type": "code",
"source": [
"var h = Tensor<Float>(zeros: [1, 10])\n",
"var cell = RNNCell<Float>(hiddenSize: 10)\n",
"let context = Context(learningPhase: .training)\n",
"\n",
"var backprops: [RNNCell<Float>.Backpropagator] = []\n",
"\n",
"var dŷŷ: [Tensor<Float>] = []\n",
"for (i, (x, y)) in zip(xx, yy).enumerated() {\n",
" let (out, backprop) = cell.appliedForBackpropagation(to: .init(x: x, h: h), in: context)\n",
" backprops.append(backprop)\n",
" let (loss, dŷ) = out.y.valueWithGradient { ŷ in meanSquaredError(predicted: ŷ, expected: y) }\n",
" print(\"Loss at timestep \\(i):\", loss)\n",
" dŷŷ.append(dŷ)\n",
"}"
],
"execution_count": 0,
"outputs": [
{
"output_type": "stream",
"text": [
"Loss at timestep 0: 0.20855089\r\n",
"Loss at timestep 1: 0.42279926\r\n",
"Loss at timestep 2: 0.20128746\r\n",
"Loss at timestep 3: 0.30406743\r\n",
"Loss at timestep 4: 0.23538566\r\n",
"Loss at timestep 5: 0.38065034\r\n",
"Loss at timestep 6: 0.32316795\r\n",
"Loss at timestep 7: 0.08666752\r\n",
"Loss at timestep 8: 0.38324124\r\n",
"Loss at timestep 9: 0.13454746\r\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "VxfDIrzf7-UN",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"let expectedY: Tensor<Float> = [1.0, 2.0, 3.0, 4.0, 5.0, 6, 7, 8, 9, 0]\n",
"var gradH = Tensor<Float>(zeros: [1, 10])"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "2TG08UYw8z8L",
"colab_type": "code",
"outputId": "e07327f4-bfa5-48af-ef19-65786d143bb2",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 2417
}
},
"cell_type": "code",
"source": [
"var opt = Adam<RNNCell<Float>, Float>()\n",
"for (i, (bp, dŷ)) in zip(backprops, dŷŷ).enumerated().reversed() {\n",
" print(\"Backpropagate for timestep \\(i)...\")\n",
" let (gradLayer, gradInput) = bp(.init(h: gradH, y: dŷ))\n",
" print(\"Gradient w.r.t. the cell internals:\")\n",
" dump(gradLayer)\n",
" \n",
" print(\"Gradient w.r.t. inputs at timestep \\(i):\")\n",
" dump(gradInput)\n",
" \n",
" opt.update(&cell.allDifferentiableVariables, along: gradLayer)\n",
" \n",
" gradH = gradInput.h\n",
" print()\n",
"}"
],
"execution_count": 0,
"outputs": [
{
"output_type": "stream",
"text": [
"Backpropagate for timestep 9...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.000640558, 0.06328114, -0.012436222, -0.0050123963, -0.013553808, -0.019867968, -0.029421052, 0.013694953, -0.011355184, 0.006419653], [-0.000730931, 0.07220915, -0.014190785, -0.005719569, -0.015466045, -0.022671036, -0.033571914, 0.015627103, -0.012957228, 0.0073253685], [-0.0015441348, 0.15254608, -0.029978868, -0.012082927, -0.03267293, -0.0478939, -0.07092264, 0.033013172, -0.027372908, 0.015475273], [-0.00041293, 0.040793624, -0.0080169, -0.0032311967, -0.0087373415, -0.012807708, -0.01896602, 0.008828329, -0.0073200185, 0.0041383724], [-0.0013938203, 0.13769642, -0.02706056, -0.010906709, -0.029492369, -0.043231647, -0.06401865, 0.029799491, -0.02470828, 0.013968825], [-0.001254071, 0.1238905, -0.024347376, -0.009813164, -0.026535362, -0.038897093, -0.057599917, 0.026811691, -0.022230942, 0.012568262], [-0.00033295425, 0.032892767, -0.006464197, -0.0026053826, -0.007045104, -0.010327128, -0.015292704, 0.0071184696, -0.005902286, 0.0033368575], [-0.00012474299, 0.012323442, -0.002421844, -0.0009761198, -0.002639484, -0.0038691107, -0.005729489, 0.0026669707, -0.0022113214, 0.0012501705], [-0.000183761, 0.018153869, -0.0035676593, -0.0014379384, -0.0038882683, -0.0056996522, -0.008440207, 0.003928759, -0.003257535, 0.0018416473], [-0.0006211301, 0.061361846, -0.012059036, -0.0048603723, -0.013142725, -0.01926538, -0.02852872, 0.013279589, -0.011010786, 0.006224947], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.0015874886, 0.15682903, -0.030820567, -0.012422172, -0.03359027, -0.04923859, -0.0729139, 0.033940066, -0.02814144, 0.015909763]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[0.0063044075, 0.009919947, -0.0047326125, -0.0067721717, 0.006674452, 0.002370327, 0.006311346, -0.0066085905, -0.0077271773, 0.00345735], [-0.0037052934, -0.005830257, 0.0027815013, 0.003980213, -0.00392278, -0.0013931139, -0.0037093712, 0.0038840713, 0.004541499, -0.0020319906], [-0.00019865076, -0.00031257578, 0.00014912378, 0.00021338993, -0.0002103108, -7.4688585e-05, -0.00019886938, 0.0002082355, 0.00024348199, -0.000108940476], [0.03530825, 0.05555732, -0.026505308, -0.037927996, 0.03738071, 0.0132751735, 0.035347108, -0.037011847, -0.043276567, 0.019363116], [0.033870496, 0.05329502, -0.02542601, -0.03638356, 0.035858564, 0.012734607, 0.03390777, -0.03550472, -0.04151434, 0.018574648], [0.022501918, 0.035406634, -0.016891811, -0.024171479, 0.023822695, 0.008460256, 0.022526683, -0.02358762, -0.02758012, 0.012340098], [-0.021954058, -0.034544576, 0.01648054, 0.023582969, -0.023242677, -0.008254272, -0.021978218, 0.023013324, 0.026908617, -0.012039649], [-0.011800575, -0.018568134, 0.008858493, 0.012676136, -0.012493224, -0.004436773, -0.011813562, 0.012369945, 0.014463712, -0.0064714593], [0.023664426, 0.03723583, -0.017764485, -0.025420241, 0.025053438, 0.008897335, 0.02369047, -0.024806216, -0.02900498, 0.012977619], [-0.048173007, -0.075799935, 0.036162663, 0.05174727, -0.051000576, -0.018112056, -0.04822602, 0.05049732, 0.059044622, -0.026418174]]\r\n",
" - bias: [-0.06538403, -0.10288138, 0.04908269, 0.07023529, -0.069221824, -0.024583045, -0.06545599, 0.06853876, 0.08013981, -0.035856735]\r\n",
"Gradient w.r.t. inputs at timestep 9:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.08947787, 0.12011255, 0.034768447, -0.04035787, -0.030750655, -0.062523924, -0.0070385123, 0.058214515, -0.012832481, 0.05072426]]\r\n",
" - h: [[-0.05670216, -0.02618239, -0.0001248261, 0.10403861, -0.021019395, 0.052298088, 0.017753974, -0.027929984, -6.311387e-05, -0.0632817]]\r\n",
"\r\n",
"Backpropagate for timestep 8...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.10734044, 0.11468596, -0.11535265, 0.042230345, -0.0258398, 0.017467082, -0.050975613, -0.0052710474, -0.026682898, 0.0034956916], [-0.093212865, 0.09959161, -0.10017056, 0.036672216, -0.022438906, 0.015168158, -0.04426648, -0.0045773005, -0.02317104, 0.0030356075], [-0.1025377, 0.10955456, -0.11019143, 0.04034083, -0.024683649, 0.016685551, -0.048694808, -0.005035205, -0.025489025, 0.0033392836], [-0.14015816, 0.14974946, -0.15061998, 0.055141635, -0.03373993, 0.022807378, -0.06656064, -0.0068825907, -0.034840792, 0.0045644464], [-0.01853124, 0.01979937, -0.019914469, 0.0072906413, -0.0044609797, 0.0030155147, -0.008800424, -0.000909993, -0.0046065324, 0.00060349575], [-0.02668846, 0.028514806, -0.028680569, 0.010499891, -0.0064246478, 0.004342907, -0.012674261, -0.0013105606, -0.006634271, 0.0008691471], [-0.10287356, 0.1099134, -0.110552356, 0.040472966, -0.024764499, 0.016740205, -0.04885431, -0.0050516976, -0.025572514, 0.0033502213], [-0.08679112, 0.09273041, -0.093269475, 0.034145743, -0.020893013, 0.014123173, -0.041216813, -0.004261955, -0.02157471, 0.0028264744], [-0.051159687, 0.054660648, -0.054978404, 0.020127468, -0.012315546, 0.008325012, -0.024295565, -0.002512242, -0.012717376, 0.0016660868], [-0.13420662, 0.14339066, -0.14422421, 0.052800156, -0.03230723, 0.021838909, -0.06373428, -0.006590335, -0.03336135, 0.0043706265], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.14101861, 0.1506688, -0.15154468, 0.05548016, -0.033947065, 0.022947397, -0.06696927, -0.0069248443, -0.035054687, 0.0045924685]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[0.0011485402, 0.009174719, -0.010124742, -0.0033456418, 0.00034781912, 0.0041223555, 0.006442137, -0.005616106, -0.00907693, 0.008414477], [-0.007256147, -0.05796325, 0.06396522, 0.021136805, -0.0021974214, -0.026043858, -0.040699575, 0.035480946, 0.05734544, -0.053160254], [0.0005265999, 0.004206563, -0.0046421434, -0.0015339599, 0.00015947332, 0.0018900791, 0.0029536874, -0.0025749563, -0.0041617267, 0.0038579956], [0.013184555, 0.105320305, -0.116225995, -0.03840597, 0.0039927554, 0.047322176, 0.073951885, -0.06446954, -0.10419773, 0.09659317], [0.0073953224, 0.059075, -0.06519209, -0.021542216, 0.0022395686, 0.026543388, 0.041480206, -0.036161482, -0.058445342, 0.054179884], [0.0087679075, 0.07003943, -0.07729186, -0.02554049, 0.0026552365, 0.03146989, 0.049179006, -0.042873118, -0.0692929, 0.06423577], [-0.003133415, -0.025030212, 0.027622038, 0.0091274865, -0.00094891037, -0.011246494, -0.017575258, 0.015321703, 0.024763426, -0.022956142], [-0.008362266, -0.0667991, 0.073716, 0.024358876, -0.002532394, -0.030013954, -0.046903774, 0.04088962, 0.06608711, -0.061263945], [0.012968538, 0.10359473, -0.11432174, -0.037776724, 0.0039273384, 0.046546847, 0.07274026, -0.06341327, -0.10249055, 0.095010586], [-0.013483802, -0.107710734, 0.11886395, 0.03927766, -0.0040833782, -0.048396237, -0.07563036, 0.06593279, 0.10656268, -0.09878553]]\r\n",
" - bias: [-0.016268574, -0.12995593, 0.14341259, 0.047389567, -0.004926707, -0.058391377, -0.091250084, 0.07954971, 0.12857078, -0.11918743]\r\n",
"Gradient w.r.t. inputs at timestep 8:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.09979025, 0.10710498, 0.078494206, -0.07245011, -0.07058711, -0.09289983, -0.103611186, 0.043155115, 0.005921991, -0.0042316657]]\r\n",
" - h: [[-0.18487227, -0.09399247, 0.026940424, 0.17046703, -0.0075985426, 0.029077685, 0.11114061, -0.0864709, 0.10472884, -0.13303874]]\r\n",
"\r\n",
"Backpropagate for timestep 7...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.04403745, 0.0130184125, -0.006613736, 0.015921751, 0.0006977035, 0.0009354017, 0.017573481, -0.030180687, 0.009515903, -0.01233819], [-0.06010938, 0.01776962, -0.0090274885, 0.02173256, 0.00095233775, 0.0012767863, 0.023987107, -0.041195445, 0.012988832, -0.016841143], [-0.18517137, 0.05474062, -0.027809843, 0.06694875, 0.0029337467, 0.0039332346, 0.07389405, -0.1269056, 0.040013053, -0.051880382], [-0.08514865, 0.025171762, -0.012787995, 0.030785514, 0.0013490452, 0.0018086467, 0.03397922, -0.05835589, 0.018399483, -0.023856519], [-0.16343217, 0.048314046, -0.024544954, 0.059088938, 0.0025893233, 0.003471471, 0.06521885, -0.11200683, 0.035315502, -0.0457896], [-0.045034513, 0.013313166, -0.006763479, 0.016282238, 0.00071350037, 0.00095658033, 0.017971367, -0.030864015, 0.009731355, -0.012617542], [-0.053094994, 0.015696017, -0.007974037, 0.019196507, 0.00084120594, 0.0011277935, 0.021187963, -0.036388196, 0.011473117, -0.014875887], [-0.041978277, 0.012409678, -0.0063044806, 0.015177256, 0.0006650792, 0.0008916627, 0.016751753, -0.028769452, 0.009070944, -0.011761262], [-0.114712, 0.03391132, -0.017227948, 0.04147415, 0.0018174297, 0.0024366034, 0.0457767, -0.07861688, 0.024787728, -0.032139428], [-0.0543095, 0.01605505, -0.008156437, 0.019635612, 0.0008604478, 0.0011535907, 0.02167262, -0.037220545, 0.011735556, -0.0152161615], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.19813697, 0.05857353, -0.029757073, 0.07163647, 0.003139166, 0.0042086374, 0.07906807, -0.13579147, 0.042814746, -0.055513017]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.0048478963, 0.012348941, -0.015174473, -0.014782215, 0.013156098, 0.015084219, 0.0026072364, -0.008783834, -0.020053566, 0.014843206], [0.00063282036, -0.0016119694, 0.0019808004, 0.001929597, -0.0017173319, -0.0019690192, -0.0003403357, 0.0011465981, 0.002617693, -0.0019375585], [-0.0021406636, 0.0054528653, -0.0067005227, -0.006527315, 0.0058092787, 0.00666067, 0.0011512655, -0.0038786377, -0.008854962, 0.006554247], [-0.014185952, 0.036135565, -0.04440366, -0.043255832, 0.038497478, 0.04413956, 0.0076293154, -0.025703324, -0.058680903, 0.043434307], [-0.012726692, 0.032418422, -0.039836008, -0.038806252, 0.034537375, 0.039599076, 0.0068445136, -0.02305931, -0.0526446, 0.03896637], [-0.010007478, 0.02549183, -0.031324554, -0.030514821, 0.02715804, 0.031138247, 0.0053820997, -0.018132407, -0.041396435, 0.030640725], [0.010513523, -0.026780866, 0.032908533, 0.03205785, -0.028531332, -0.032712802, -0.005654254, 0.019049302, 0.043489713, -0.032190125], [-0.0027280767, 0.0069491705, -0.008539193, -0.008318457, 0.007403386, 0.008488405, 0.0014671809, -0.0049429634, -0.011284826, 0.008352779], [-0.008283018, 0.021099152, -0.025926799, -0.025256595, 0.022478247, 0.025772594, 0.004454672, -0.015007882, -0.034263123, 0.025360804], [0.013498845, -0.034385312, 0.042252935, 0.041160703, -0.036632825, -0.042001627, -0.0072597833, 0.024458364, 0.05583865, -0.04133053]]\r\n",
" - bias: [0.020397536, -0.0519582, 0.06384663, 0.062196206, -0.05535432, -0.06346689, -0.010969954, 0.036958005, 0.08437543, -0.06245283]\r\n",
"Gradient w.r.t. inputs at timestep 7:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.0017714538, -0.07887418, -0.0012210985, -0.020467646, 0.08371094, -0.106230006, -0.08306152, -0.06940515, 0.046880398, -0.051049326]]\r\n",
" - h: [[-0.18878785, -0.029284673, -0.031357054, 0.011796875, -0.008182654, -0.044745173, 0.09676024, -0.028658293, 0.13462953, -0.07993689]]\r\n",
"\r\n",
"Backpropagate for timestep 6...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.1143998, 0.14551115, -0.15564995, 0.042135153, -0.04568573, -0.02051818, 0.023390952, -0.060700506, 0.021335162, 0.0035188247], [-0.12921293, 0.16435276, -0.17580439, 0.047591053, -0.051601376, -0.02317499, 0.026419746, -0.068560354, 0.02409776, 0.003974462], [-0.03836751, 0.048801664, -0.052202024, 0.014131327, -0.015322123, -0.0068814065, 0.007844879, -0.020357793, 0.0071554063, 0.0011801467], [-0.0795098, 0.10113271, -0.10817935, 0.029284647, -0.03175236, -0.014260483, 0.01625711, -0.04218788, 0.014828299, 0.0024456428], [-0.15081988, 0.19183579, -0.20520236, 0.055549216, -0.060230147, -0.027050307, 0.03083765, -0.080024995, 0.028127382, 0.0046390705], [-0.15258804, 0.19408478, -0.20760806, 0.056200452, -0.060936257, -0.027367434, 0.031199176, -0.08096318, 0.028457135, 0.004693457], [-0.044035975, 0.056011684, -0.059914418, 0.016219107, -0.017585833, -0.007898075, 0.009003892, -0.023365479, 0.008212555, 0.0013545031], [-0.051793788, 0.065879256, -0.070469536, 0.019076426, -0.020683927, -0.009289477, 0.010590106, -0.027481772, 0.00965936, 0.0015931256], [-0.12684317, 0.16133854, -0.17258014, 0.046718236, -0.05065501, -0.022749962, 0.025935208, -0.06730296, 0.023655808, 0.0039015706], [-0.04160411, 0.052918464, -0.05660567, 0.0153234145, -0.016614662, -0.0074619064, 0.008506656, -0.02207513, 0.0077590207, 0.0012797012], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.15673485, 0.19935934, -0.21325013, 0.057727788, -0.0625923, -0.028111186, 0.032047063, -0.08316348, 0.029230502, 0.004821009]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.0018076149, -0.015574821, 0.013144997, -0.0019092318, -0.009866056, -0.015755707, -0.01218865, 0.015761774, 0.012586001, -0.010852228], [-0.00066994346, -0.0057723853, 0.004871837, -0.000707605, -0.0036565862, -0.0058394256, -0.0045173923, 0.0058416743, 0.00466466, -0.0040220837], [0.0018647965, 0.01606751, -0.013560822, 0.0019696278, 0.010178156, 0.01625412, 0.012574222, -0.016260378, -0.012984143, 0.011195524], [0.008589307, 0.07400742, -0.062461544, 0.009072163, 0.046880886, 0.07486695, 0.057917234, -0.07489578, -0.05980534, 0.05156691], [0.005181051, 0.04464111, -0.037676662, 0.0054723085, 0.028278446, 0.045159575, 0.034935545, -0.045176964, -0.03607445, 0.031105045], [0.011069664, 0.09537874, -0.080498725, 0.011691955, 0.0604188, 0.09648647, 0.074642144, -0.09652362, -0.07707549, 0.066458024], [-0.0055106324, -0.047480863, 0.040073384, -0.005820418, -0.030077318, -0.048032306, -0.037157897, 0.048050802, 0.03836925, -0.033083726], [0.0033015353, 0.028446779, -0.024008803, 0.0034871341, 0.01801995, 0.02877716, 0.022262074, -0.02878824, -0.02298782, 0.019821152], [0.009632804, 0.08299843, -0.07004987, 0.010174321, 0.052576344, 0.08396237, 0.064953476, -0.08399471, -0.06707097, 0.057831667], [-0.013995955, -0.120592326, 0.101778746, -0.01478275, -0.07639065, -0.121992886, -0.094373964, 0.12203986, 0.09745056, -0.08402635]]\r\n",
" - bias: [-0.015619485, -0.13458103, 0.11358508, -0.016497549, -0.08525196, -0.13614406, -0.10532134, 0.13619648, 0.10875483, -0.0937734]\r\n",
"Gradient w.r.t. inputs at timestep 6:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.09359281, 0.088289276, 0.0926217, -0.08890124, 0.017410873, -0.14506882, -0.18240227, 0.060235284, 0.09583258, 0.00710559]]\r\n",
" - h: [[-0.25716615, -0.06737684, -0.017783895, 0.14022215, -0.06765262, 0.046495683, 0.12078379, -0.04995855, 0.17339744, -0.15334521]]\r\n",
"\r\n",
"Backpropagate for timestep 5...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.15514235, 0.02243688, -0.076506406, 0.035190415, -0.03185416, 0.030330706, 0.051876277, -0.037571877, 0.028197411, -0.03202182], [-0.24953371, 0.036087874, -0.12305425, 0.05660089, -0.051234797, 0.048784446, 0.083438724, -0.060431276, 0.045353215, -0.051504467], [-0.23226875, 0.033590995, -0.11454027, 0.05268474, -0.04768992, 0.045409106, 0.077665694, -0.056250103, 0.042215277, -0.04794093], [-0.049163606, 0.007110101, -0.024244383, 0.011151615, -0.010094376, 0.009611604, 0.016439255, -0.011906285, 0.008935576, -0.010147507], [-0.027652724, 0.003999171, -0.013636575, 0.0062723737, -0.005677716, 0.0054061743, 0.009246478, -0.0066968477, 0.005025934, -0.0057076], [-0.047132168, 0.0068163127, -0.023242606, 0.010690831, -0.009677278, 0.009214453, 0.015759986, -0.011414318, 0.008566359, -0.009728213], [-0.020616176, 0.0029815368, -0.010166595, 0.0046762973, -0.004232957, 0.004030512, 0.006893607, -0.0049927593, 0.003747028, -0.004255237], [-0.26180187, 0.037862107, -0.12910412, 0.05938363, -0.053753715, 0.0511829, 0.087540925, -0.06340233, 0.047582973, -0.054036643], [-0.054436892, 0.0078727305, -0.026844835, 0.012347736, -0.011177099, 0.010642544, 0.01820253, -0.013183353, 0.009894007, -0.011235929], [-0.1729073, 0.025006067, -0.08526695, 0.03921998, -0.035501696, 0.0338038, 0.057816494, -0.041874137, 0.031426225, -0.035688557], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.28643098, 0.041424002, -0.14124966, 0.06497017, -0.05881062, 0.055997953, 0.09577638, -0.06936694, 0.052059364, -0.059120167]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-9.824643e-05, -0.0013941383, 0.001933154, -0.00033014506, -0.00012530807, -0.0025716508, -0.0010433901, 0.0015593015, 0.0029445724, -0.0015568875], [-0.0037583525, -0.05333184, 0.07395153, -0.012629481, -0.0047935774, -0.0983768, -0.0399142, 0.059650052, 0.112642676, -0.059557702], [0.002963754, 0.04205632, -0.058316547, 0.009959331, 0.0037801096, 0.077577785, 0.03147546, -0.047038715, -0.088827536, 0.046965893], [0.0038895532, 0.05519361, -0.07653311, 0.013070365, 0.004960917, 0.10181105, 0.04130757, -0.06173238, -0.11657493, 0.06163681], [0.002539571, 0.036037065, -0.04997007, 0.0085339155, 0.0032390866, 0.06647457, 0.026970576, -0.040306367, -0.076114215, 0.040243965], [0.00029283762, 0.00415543, -0.0057620434, 0.0009840449, 0.00037349874, 0.0076651755, 0.0031099743, -0.0046477225, -0.008776722, 0.004640527], [-0.0016905874, -0.023989804, 0.03326498, -0.005681011, -0.0021562537, -0.04425199, -0.01795426, 0.026831869, 0.050669085, -0.02679033], [-0.003295019, -0.04675704, 0.06483471, -0.011072506, -0.0042026206, -0.086248815, -0.034993537, 0.052296333, 0.09875597, -0.05221537], [0.0035793341, 0.050791536, -0.070429064, 0.012027913, 0.004565249, 0.09369091, 0.038013, -0.056808796, -0.10727727, 0.056720845], [-0.003960697, -0.056203153, 0.077932976, -0.013309435, -0.0050516566, -0.10367327, -0.042063124, 0.062861525, 0.118707195, -0.062764205]]\r\n",
" - bias: [-0.005125993, -0.07273896, 0.10086202, -0.01722527, -0.0065379296, -0.1341755, -0.05443872, 0.081356324, 0.15363263, -0.08123037]\r\n",
"Gradient w.r.t. inputs at timestep 5:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.04090657, -0.059062827, 0.100006685, -0.0583108, 0.06604084, -0.16598706, -0.16823077, -0.029294372, 0.040427804, -0.04106324]]\r\n",
" - h: [[-0.21733943, -0.09941908, -0.034144446, 0.08617879, 0.033695, -0.014033023, 0.14061984, -0.059341643, 0.18643023, -0.16059524]]\r\n",
"\r\n",
"Backpropagate for timestep 4...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.18008752, 0.0840631, -0.09517938, 0.018358398, -0.005289945, -0.015194324, 0.055717, -0.06100581, 0.100946024, -0.036304887], [-0.07729433, 0.036080237, -0.040851396, 0.007879502, -0.0022704669, -0.006521468, 0.023913974, -0.026183952, 0.043326464, -0.015582213], [-0.16407457, 0.07658841, -0.08671626, 0.016726013, -0.0048195757, -0.01384328, 0.050762776, -0.055581316, 0.091970146, -0.033076745], [-0.035609987, 0.016622394, -0.018820498, 0.0036301368, -0.0010460186, -0.0030044818, 0.01101732, -0.012063113, 0.019960776, -0.0071788244], [-0.21433361, 0.10004884, -0.11327904, 0.021849498, -0.0062959003, -0.01808373, 0.06631235, -0.07260689, 0.12014229, -0.04320876], [-0.022387538, 0.010450284, -0.011832204, 0.0022822202, -0.00065761834, -0.0018888789, 0.006926446, -0.007583923, 0.012549082, -0.004513234], [-0.048931427, 0.022840712, -0.02586111, 0.004988145, -0.0014373265, -0.004128437, 0.01513882, -0.016575838, 0.02742796, -0.009864371], [-0.044972643, 0.020992791, -0.023768824, 0.00458458, -0.00132104, -0.0037944268, 0.013914017, -0.015234773, 0.025208909, -0.009066297], [-0.14715818, 0.068692, -0.07777566, 0.015001531, -0.0043226685, -0.012416013, 0.04552904, -0.04985078, 0.08248786, -0.029666472], [-0.13045064, 0.060893085, -0.06894543, 0.013298338, -0.0038318965, -0.011006366, 0.04035992, -0.044190995, 0.073122635, -0.026298303], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.21858466, 0.10203318, -0.11552579, 0.022282856, -0.0064207716, -0.0184424, 0.06762757, -0.07404696, 0.12252516, -0.04406575]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[0.011533357, 0.048060756, -0.043404955, -0.025141835, 0.02336665, 0.031657193, -0.0029019103, -0.028694883, -0.045348093, 0.03963606], [-0.013376958, -0.055743244, 0.050343215, 0.029160744, -0.027101798, -0.03671758, 0.003365779, 0.033281744, 0.05259696, -0.045971863], [0.003497958, 0.014576372, -0.013164313, -0.0076252804, 0.0070868838, 0.009601327, -0.0008801219, -0.008702886, -0.013753647, 0.012021241], [0.021701276, 0.09043158, -0.081671186, -0.04730712, 0.043966915, 0.059566483, -0.0054602623, -0.05399257, -0.08532741, 0.07457959], [0.018053958, 0.07523281, -0.06794477, -0.039356247, 0.03657743, 0.049555186, -0.0045425603, -0.04491808, -0.070986494, 0.062045056], [0.017000947, 0.0708448, -0.06398184, -0.03706076, 0.03444402, 0.04666484, -0.0042776116, -0.042298194, -0.06684615, 0.058426227], [-0.018264992, -0.07611222, 0.06873898, 0.039816286, -0.03700499, -0.050134443, 0.0045956587, 0.045443133, 0.071816266, -0.06277031], [-0.0047450066, -0.01977296, 0.01785749, 0.010343751, -0.009613412, -0.013024273, 0.0011938921, 0.011805532, 0.018656926, -0.016306905], [0.010377324, 0.04324344, -0.03905431, -0.022621773, 0.021024521, 0.028484073, -0.0026110406, -0.025818685, -0.04080268, 0.035663184], [-0.021418259, -0.08925222, 0.080606066, 0.046690162, -0.043393523, -0.058789644, 0.0053890524, 0.053288423, 0.084214605, -0.07360696]]\r\n",
" - bias: [-0.028692052, -0.11956291, 0.10798047, 0.06254648, -0.05813027, -0.07875503, 0.007219213, 0.071385555, 0.11281449, -0.09860441]\r\n",
"Gradient w.r.t. inputs at timestep 4:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.04251183, -0.03061599, 0.046058834, -0.08118142, 0.08444147, -0.16364856, -0.12710604, -0.035027284, 0.045792386, -0.005074829]]\r\n",
" - h: [[-0.22532561, -0.040279906, -0.08372399, 0.076172076, -0.010239625, 0.0026400937, 0.06364826, -0.035761528, 0.12529273, -0.1145605]]\r\n",
"\r\n",
"Backpropagate for timestep 3...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.08073181, 0.074366815, -0.06593688, 0.0052234954, -0.013727614, -0.0021120252, 0.005818339, -0.023595866, 0.006527828, -0.0030501033], [-0.062275115, 0.05736527, -0.050862562, 0.0040293136, -0.010589243, -0.0016291796, 0.0044881655, -0.01820144, 0.005035453, -0.0023527965], [-0.17895089, 0.16484219, -0.1461563, 0.011578449, -0.030428758, -0.004681535, 0.012896985, -0.052302815, 0.014469644, -0.0067608873], [-0.21545933, 0.19847226, -0.1759742, 0.013940612, -0.036636643, -0.005636633, 0.015528148, -0.06297331, 0.017421652, -0.008140202], [-0.20135216, 0.18547732, -0.16445231, 0.013027852, -0.03423786, -0.005267575, 0.014511444, -0.058850143, 0.016280971, -0.007607223], [-0.009381022, 0.008641411, -0.0076618535, 0.00060696923, -0.0015951463, -0.00024541697, 0.00067608996, -0.0027418353, 0.00075853243, -0.00035442147], [-0.1687075, 0.1554064, -0.13779013, 0.010915684, -0.028686976, -0.0044135577, 0.012158745, -0.049308937, 0.0136413835, -0.0063738856], [-0.24380766, 0.22458556, -0.1991274, 0.0157748, -0.041456986, -0.0063782535, 0.01757121, -0.07125881, 0.019713845, -0.009211221], [-0.15871505, 0.14620177, -0.1296289, 0.010269154, -0.026987862, -0.0041521452, 0.011438589, -0.046388395, 0.012833412, -0.0059963637], [-0.16677332, 0.15362471, -0.1362104, 0.010790538, -0.028358089, -0.0043629576, 0.012019348, -0.048743624, 0.013484989, -0.0063008107], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.24702872, 0.22755268, -0.20175818, 0.015983209, -0.042004693, -0.0064625195, 0.017803352, -0.072200246, 0.019974295, -0.009332915]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[0.0006719203, 0.022431433, -0.016068995, -0.009550882, 0.012152319, 0.0146735255, 0.004620525, -0.017257262, -0.020375777, 0.021573026], [-0.0008907359, -0.029736388, 0.021301977, 0.012661194, -0.016109807, -0.019452063, -0.0061252317, 0.02287721, 0.027011294, -0.028598435], [-6.332327e-05, -0.0021139884, 0.001514378, 0.00090009643, -0.0011452617, -0.0013828658, -0.0004354486, 0.0016263629, 0.0019202587, -0.0020330902], [0.0037686543, 0.12581302, -0.09012748, -0.053568814, 0.06815971, 0.0823006, 0.025915518, -0.09679221, -0.114283286, 0.1209984], [0.0026491974, 0.088440984, -0.06335564, -0.037656505, 0.04791326, 0.057853684, 0.018217463, -0.06804065, -0.080336094, 0.08505652], [0.0027591581, 0.09211192, -0.06598535, -0.03921952, 0.049902007, 0.060255032, 0.018973619, -0.07086483, -0.08367062, 0.08858698], [-0.0027440342, -0.09160703, 0.06562366, 0.039004546, -0.049628474, -0.05992475, -0.018869618, 0.07047639, 0.083211996, -0.0881014], [-7.6903685e-05, -0.0025673578, 0.001839154, 0.0010931327, -0.0013908765, -0.0016794376, -0.00052883563, 0.0019751554, 0.0023320806, -0.00246911], [0.0030253206, 0.100997515, -0.072350636, -0.04300284, 0.05471581, 0.06606754, 0.020803912, -0.07770081, -0.09174192, 0.097132534], [-0.003348275, -0.11177904, 0.0800741, 0.04759341, -0.060556747, -0.07312028, -0.023024738, 0.085995406, 0.10153542, -0.10750148]]\r\n",
" - bias: [-0.0042303638, -0.14122675, 0.10116928, 0.06013169, -0.07651016, -0.092383504, -0.029090507, 0.10865053, 0.12828448, -0.13582228]\r\n",
"Gradient w.r.t. inputs at timestep 3:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.12104246, 0.092024185, 0.1183735, -0.111260004, 0.020885527, -0.19859217, -0.16557567, 0.066239506, 0.078100584, 0.028695883]]\r\n",
" - h: [[-0.2750513, -0.06940738, -0.05560623, 0.17940661, -0.025950314, 0.0362355, 0.15094438, -0.12081307, 0.18274353, -0.20784296]]\r\n",
"\r\n",
"Backpropagate for timestep 2...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.28254563, 0.14368871, -0.1404115, 0.113639764, -0.037496354, 0.006469098, 0.0772544, -0.11695952, 0.08155462, -0.0324888], [-0.1249004, 0.06351815, -0.062069453, 0.050234903, -0.016575411, 0.00285969, 0.03415061, -0.051702414, 0.036051538, -0.014361802], [-0.14773425, 0.07513032, -0.07341677, 0.05941867, -0.019605668, 0.0033824884, 0.040393908, -0.061154466, 0.042642355, -0.016987376], [-0.26389545, 0.13420415, -0.13114327, 0.10613868, -0.03502131, 0.006042088, 0.07215503, -0.1092393, 0.07617139, -0.030344293], [-0.24467118, 0.12442763, -0.12158973, 0.09840667, -0.032470074, 0.005601933, 0.06689867, -0.10128142, 0.07062245, -0.028133769], [-0.06556808, 0.03334468, -0.03258416, 0.026371462, -0.008701476, 0.0015012312, 0.017927805, -0.02714185, 0.018925723, -0.007539414], [-0.09914767, 0.05042159, -0.04927159, 0.03987716, -0.0131577905, 0.0022700615, 0.027109228, -0.041042093, 0.02861821, -0.011400597], [-0.05026775, 0.025563685, -0.024980638, 0.020217674, -0.006670984, 0.0011509185, 0.013744347, -0.02080829, 0.0145093985, -0.005780089], [-0.19021572, 0.096734285, -0.094528, 0.0765047, -0.025243342, 0.004355134, 0.052009307, -0.07873963, 0.0549043, -0.021872152], [-0.14116226, 0.07178813, -0.07015081, 0.056775417, -0.018733505, 0.0032320176, 0.038596973, -0.058433995, 0.0407454, -0.01623169], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.29062054, 0.1477952, -0.14442433, 0.11688749, -0.038567968, 0.006653979, 0.07946227, -0.12030212, 0.08388538, -0.033417303]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[0.0054448713, 0.042526, -0.045361154, -0.020679072, 0.016229568, 0.019552989, 0.010503286, -0.025553431, -0.031785667, 0.03916882], [-0.0022239375, -0.017369589, 0.018527595, 0.00844629, -0.0066289078, -0.007986346, -0.004290028, 0.010437205, 0.012982739, -0.01599836], [-0.0019817501, -0.0154780345, 0.016509935, 0.0075264866, -0.0059070177, -0.0071166307, -0.0038228428, 0.0093005905, 0.011568915, -0.014256134], [0.009897164, 0.077299684, -0.082453154, -0.037588432, 0.029500553, 0.035541546, 0.019091865, -0.046448577, -0.05777694, 0.07119732], [0.009487018, 0.07409632, -0.07903623, -0.036030736, 0.028278027, 0.034068678, 0.018300682, -0.04452371, -0.055382613, 0.06824685], [0.011334715, 0.08852737, -0.09442937, -0.043048106, 0.033785474, 0.04070391, 0.021864934, -0.053195175, -0.066168964, 0.08153865], [-0.0066127987, -0.051647846, 0.055091143, 0.025114741, -0.019710818, -0.023747114, -0.012756245, 0.031034654, 0.03860371, -0.04757055], [0.000111350615, 0.00086968014, -0.00092766056, -0.0004228984, 0.00033190363, 0.0003998694, 0.00021479797, -0.00052258174, -0.00065003446, 0.00080102397], [0.008282713, 0.06469035, -0.06900317, -0.031456906, 0.024688344, 0.029743915, 0.015977548, -0.03887176, -0.04835221, 0.059583426], [-0.012803528, -0.09999921, 0.10666603, 0.04862651, -0.038163573, -0.045978542, -0.024698308, 0.06008849, 0.074743494, -0.09210486]]\r\n",
" - bias: [-0.015225027, -0.11891181, 0.1268395, 0.057823114, -0.045381352, -0.054674346, -0.029369436, 0.07145287, 0.08887954, -0.109524414]\r\n",
"Gradient w.r.t. inputs at timestep 2:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.07753633, -0.031327687, 0.06280903, -0.07583443, 0.07227123, -0.17641965, -0.19432959, -0.04373975, 0.057399802, -0.04374934]]\r\n",
" - h: [[-0.31734714, -0.0885781, -0.031163305, 0.10360871, -0.034544937, -0.013890985, 0.1398015, -0.044665508, 0.2049765, -0.15578188]]\r\n",
"\r\n",
"Backpropagate for timestep 1...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.12738647, 0.08194441, -0.10496003, 0.058640566, -0.051785726, 0.0015181532, 0.025360093, -0.059219826, 0.025232244, -0.0021941327], [-0.122365676, 0.07871467, -0.10082316, 0.05632932, -0.049744654, 0.001458317, 0.024360554, -0.05688575, 0.024237746, -0.0021076535], [-0.019926513, 0.012818209, -0.016418442, 0.00917289, -0.008100617, 0.00023747813, 0.0039669694, -0.009263501, 0.0039469707, -0.00034321865], [-0.13926275, 0.08958412, -0.11474549, 0.06410765, -0.056613725, 0.0016596912, 0.027724423, -0.06474091, 0.027584655, -0.0023986923], [-0.13547228, 0.087145805, -0.11162233, 0.06236276, -0.055072807, 0.0016145175, 0.026969817, -0.06297878, 0.026833855, -0.0023334045], [-0.19293706, 0.124111414, -0.15897043, 0.08881587, -0.078433655, 0.0022993654, 0.038409904, -0.089693196, 0.03821627, -0.0033231906], [-0.011876159, 0.007639626, -0.009785358, 0.0054670232, -0.0048279506, 0.00014153647, 0.0023643055, -0.0055210274, 0.0023523865, -0.00020455761], [-0.20039777, 0.12891069, -0.16511768, 0.092250295, -0.081466615, 0.00238828, 0.03989518, -0.09316156, 0.03969406, -0.0034516957], [-0.23034902, 0.14817755, -0.18979599, 0.10603793, -0.09364253, 0.0027452298, 0.045857873, -0.107085384, 0.045626692, -0.0039675822], [-0.1412323, 0.090851076, -0.1163683, 0.0650143, -0.057414398, 0.0016831637, 0.02811652, -0.06565652, 0.027974777, -0.0024326162], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.2595928, 0.16698933, -0.2138914, 0.1194999, -0.10553085, 0.0030937484, 0.051679727, -0.12068033, 0.051419195, -0.004471284]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[0.0026342045, -0.04152039, 0.030987043, -0.011798009, -0.027059888, -0.03704724, -0.025230287, 0.03741985, 0.03317578, -0.028115707], [0.0022375116, -0.035267703, 0.026320608, -0.01002131, -0.022984855, -0.031468183, -0.02143078, 0.031784676, 0.028179739, -0.023881676], [-0.0034476498, 0.05434193, -0.040555876, 0.015441248, 0.03541601, 0.04848747, 0.033021428, -0.04897514, -0.0434205, 0.036797866], [-0.0060414346, 0.09522522, -0.071067445, 0.027058227, 0.062060684, 0.08496625, 0.057864573, -0.08582081, -0.07608723, 0.06448216], [-0.001501488, 0.023666488, -0.017662514, 0.006724827, 0.0154240485, 0.021116808, 0.014381181, -0.021329192, -0.018910088, 0.016025862], [-0.005476591, 0.08632215, -0.064423, 0.024528421, 0.05625833, 0.077022344, 0.05245453, -0.077797, -0.06897346, 0.058453407], [0.0061461423, -0.09687563, 0.07229916, -0.027527189, -0.0631363, -0.08643886, -0.058867462, 0.08730823, 0.077405944, -0.06559974], [-0.00072185555, 0.011377903, -0.008491432, 0.0032330286, 0.0074152667, 0.010152118, 0.006913898, -0.010254225, -0.009091216, 0.0077045946], [-0.0069390885, 0.10937407, -0.081626855, 0.031078616, 0.07128184, 0.09759079, 0.06646226, -0.098572314, -0.08739249, 0.07406311], [0.008928158, -0.14072584, 0.10502496, -0.039987214, -0.09171458, -0.1255649, -0.08551348, 0.12682779, 0.1124433, -0.09529309]]\r\n",
" - bias: [0.010215616, -0.16101876, 0.12016976, -0.045753445, -0.10494, -0.1436716, -0.09784468, 0.1451166, 0.12865783, -0.10903453]\r\n",
"Gradient w.r.t. inputs at timestep 1:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.096370354, 0.03627169, 0.10724119, -0.06602105, 0.056097828, -0.1782022, -0.22934574, 0.0029276945, 0.08282213, -0.04968884]]\r\n",
" - h: [[-0.33030224, -0.1161053, 0.016823027, 0.13035616, -0.039721716, 0.03462879, 0.16408089, -0.03564367, 0.22052546, -0.16379774]]\r\n",
"\r\n",
"Backpropagate for timestep 0...\r\n",
"Gradient w.r.t. the cell internals:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.AllDifferentiableVariables\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.26269552, 0.067049555, -0.0900621, 0.04033659, -0.029124193, 0.024582308, 0.1084545, -0.07336322, 0.06644463, -0.025360946], [-0.115497716, 0.029479263, -0.039597046, 0.01773454, -0.012804854, 0.010807951, 0.047683522, -0.032255154, 0.0292133, -0.01115029], [-0.13916123, 0.035519063, -0.047709808, 0.021368045, -0.015428351, 0.013022318, 0.057453066, -0.038863685, 0.035198607, -0.013434796], [-0.18972911, 0.048425842, -0.065046415, 0.029132685, -0.021034647, 0.017754316, 0.07833014, -0.052985825, 0.047988944, -0.018316679], [-0.19049785, 0.048622053, -0.06530997, 0.029250724, -0.021119874, 0.017826254, 0.07864752, -0.05320051, 0.04818338, -0.018390894], [-0.03658648, 0.009338214, -0.012543248, 0.0056178113, -0.004056223, 0.0034236598, 0.015104819, -0.010217539, 0.009253964, -0.0035321033], [-0.24105968, 0.061527293, -0.0826445, 0.037014432, -0.026725499, 0.022557687, 0.09952209, -0.06732096, 0.060972188, -0.023272196], [-0.14859009, 0.037925653, -0.050942384, 0.022815837, -0.016473697, 0.013904643, 0.061345793, -0.04149689, 0.037583485, -0.0143450685], [-0.34614033, 0.08834773, -0.11867017, 0.053149443, -0.038375445, 0.032390837, 0.1429049, -0.096666925, 0.087550655, -0.033416808], [-0.110009596, 0.028078493, -0.03771551, 0.016891845, -0.012196404, 0.010294389, 0.045417737, -0.03072248, 0.027825167, -0.01062046], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]\r\n",
" - bias: [-0.35209665, 0.08986801, -0.120712236, 0.05406403, -0.039035805, 0.032948215, 0.14536399, -0.098330356, 0.089057215, -0.03399184]\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>.AllDifferentiableVariables\r\n",
" - weight: [[-0.0055504874, 0.021821655, -0.020992959, -0.0056475243, 0.0076563302, 0.025213154, 0.0016401681, -0.009965107, -0.016994372, 0.02118894], [0.0057085524, -0.022443084, 0.02159079, 0.0058083525, -0.007874364, -0.025931165, -0.0016868762, 0.010248889, 0.01747833, -0.021792352], [-0.0012939068, 0.0050869747, -0.0048937923, -0.0013165276, 0.0017848122, 0.0058775865, 0.00038234922, -0.0023230244, -0.003961658, 0.0049394784], [-0.022066087, 0.08675248, -0.08345798, -0.022451859, 0.03043791, 0.100235455, 0.0065205246, -0.039616503, -0.0675615, 0.084237106], [-0.011480912, 0.045137025, -0.043422908, -0.0116816275, 0.015836744, 0.052152175, 0.0033926074, -0.020612335, -0.035152026, 0.043828286], [-0.020577349, 0.08089953, -0.0778273, -0.020937094, 0.028384348, 0.093472846, 0.0060806028, -0.036943685, -0.06300332, 0.07855386], [0.012767853, -0.050196614, 0.048290353, 0.012991068, -0.017611947, -0.057998117, -0.003772898, 0.022922853, 0.039092354, -0.048741173], [-0.0035654223, 0.014017402, -0.01348508, -0.0036277552, 0.0049181357, 0.016195972, 0.0010535816, -0.0064012054, -0.010916539, 0.01361097], [-0.019045873, 0.07487855, -0.07203497, -0.019378843, 0.026271833, 0.0865161, 0.0056280517, -0.034194138, -0.05831427, 0.07270746], [0.022883257, -0.08996517, 0.08654866, 0.023283316, -0.031565115, -0.10394746, -0.0067619984, 0.041083615, 0.0700635, -0.08735665]]\r\n",
" - bias: [0.030059058, -0.11817672, 0.11368886, 0.030584568, -0.041463397, -0.13654362, -0.008882446, 0.05396674, 0.09203422, -0.11475021]\r\n",
"Gradient w.r.t. inputs at timestep 0:\r\n",
"▿ __lldb_expr_746.RNNCell<Swift.Float>.Input\r\n",
" - x: [[0.07352697, -0.0817739, 0.103279874, -0.06649257, 0.124902405, -0.20433299, -0.18827766, -0.026122533, 0.069482416, -0.015923757]]\r\n",
" - h: [[-0.25633734, -0.0605596, -0.08648341, 0.066315815, 0.0049141045, -0.025015483, 0.14510822, -0.081763275, 0.21083005, -0.18446758]]\r\n",
"\r\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "Do9pJqKK-LVr",
"colab_type": "code",
"outputId": "e7b7271b-a308-4080-8aaf-604a95fef651",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 210
}
},
"cell_type": "code",
"source": [
"_ = dump(cell)"
],
"execution_count": 0,
"outputs": [
{
"output_type": "stream",
"text": [
"▿ __lldb_expr_72.RNNCell<Swift.Float>\r\n",
" ▿ dense0: TensorFlow.Dense<Swift.Float>\r\n",
" - weight: [[-0.34248713, 0.44801572, -0.103828, 0.042141624, -0.23705465, -0.17591175, -0.31196293, 0.16215844, 0.31867015, -0.2810968], [-0.32740194, 0.18544996, -0.1086022, -0.3567243, 0.32478803, 0.120056435, -0.42962033, 0.30290118, -0.12705001, 0.20740977], [-0.34501997, -0.21928066, 0.42865384, 0.22632171, 0.13566934, 0.4151759, -0.10920769, -0.2290533, -0.21257517, -0.33511066], [0.008183467, 0.04943365, -0.24355371, -0.4121846, -0.36315995, -0.046762012, 0.38480088, -0.2577824, -0.08160206, -0.073901825], [-0.45493713, -0.3286771, 0.25314602, 0.117646694, -0.17999394, -0.11911294, -0.16035357, -0.21022972, 0.23604928, -0.00466639], [-0.2583528, 0.10532194, 0.013762221, -0.0011807657, 0.32146177, 0.17192224, -0.43490082, 0.43095142, -0.33044037, -0.08722225], [0.037501156, 0.043058325, 0.046133853, -0.33309594, 0.13528761, -0.102291144, -0.14666128, -0.20925474, -0.27741063, 0.1391501], [0.295182, 0.13312273, 0.1834754, -0.35359412, -0.25125054, 0.43032643, -0.3833953, 0.24060705, 0.08337712, 0.03386749], [-0.41309163, -0.1793268, -0.062191155, -0.41685513, -0.10526547, -0.23250107, 0.12284965, -0.08935484, 0.28750756, -0.42626482], [0.08520921, 0.13475777, 0.32774127, 0.08433774, 0.42346004, 0.35525784, -0.32869837, 0.36002797, -0.14329678, -0.3919297], [0.08396194, -0.23342879, -0.24157588, -0.037007336, 0.36192822, -0.23589729, -0.27812254, -0.06959878, 0.08295845, -0.17156622], [-0.37807003, -0.06746188, 0.0047092102, -0.41450065, -0.006107371, 0.25015062, 0.26195183, -0.11764773, -0.30351296, 0.3661716], [0.058313, 0.384467, -0.10925189, 0.3447753, 0.34537324, 0.25728112, -0.13318077, -0.33398926, 0.11515939, -0.2768758], [-0.16631334, 0.33169407, -0.13704947, -0.3582182, 0.14386061, -0.417506, 0.38160703, 0.1333509, -0.11656784, -0.36198848], [0.011402267, -0.33045352, -0.15508737, 0.3617302, 0.32242233, -0.4424005, 0.26473084, 0.41387013, 0.35671848, 0.06658884], [-0.41002542, -0.20818438, -0.41721475, 0.028208027, 0.359967, 0.36315274, 0.32047004, -0.25271478, -0.22155668, -0.3020079], [-0.097075365, 0.33091113, -0.33918026, 0.005468107, -0.039927874, -0.20701545, 0.37369362, -0.2755432, -0.22322284, -0.15513429], [-0.20300911, 0.16717044, -0.0130553655, 0.03243034, 0.06832825, 0.20493384, -0.36162958, 0.22947027, 0.44693238, -0.18751253], [-0.31719172, 0.16516995, 0.44654763, -0.31238654, -0.3758835, 0.032348026, 0.41107893, -0.12797603, -0.12986758, 0.3344674], [-0.36995712, -0.2122042, 0.30362242, 0.326948, 0.17987496, 0.10609517, -0.33413246, 0.26505458, -0.09205407, -0.22567786]]\r\n",
" - bias: [-0.013672623, 0.0042860736, -0.020551333, -5.3688418e-05, -0.010870983, 0.015125679, -0.003182031, 0.012535127, 0.0029408473, -0.0045594643]\r\n",
" - activation: (Function)\r\n",
" ▿ dense1: TensorFlow.Dense<Swift.Float>\r\n",
" - weight: [[-0.14201522, 0.0449514, 0.34698606, -0.43087837, -0.30536678, 0.035213795, -0.23301643, -0.4500298, -0.20547284, -0.14373142], [0.010301008, 0.4372961, 0.2521369, 0.25069776, 0.4220242, -0.2380167, -0.46471238, 0.21362819, 0.19084229, 0.38297683], [-0.42452875, -0.12905145, -0.39478797, 0.015621969, -0.11949942, -0.45444468, -0.16999039, 0.021480117, -0.24327898, 0.36748502], [0.5166291, 0.08298075, 0.5068796, -0.014552139, 0.3574826, -0.13889684, 0.0906234, -0.44772846, 0.46693984, 0.041118138], [0.5119317, 0.051520776, -0.38253188, 0.35601866, 0.46337935, -0.035079967, -0.29042146, 0.054204807, 0.032464378, 0.01216427], [-0.49713248, 0.033335853, -0.5210737, -0.026833592, 0.116190545, 0.52173626, 0.42827076, 0.45590323, 0.026181351, -0.29695532], [0.37944856, -0.11646054, -0.35181278, 0.071411334, 0.08718617, -0.36273015, -0.54652816, 0.10292631, 0.49234542, 0.31701425], [-0.31250522, 0.39663535, 0.5340038, 0.28895387, -0.45707202, 0.086730964, 0.4037969, 0.41988796, 0.4839846, -0.051761996], [-0.18949457, -0.45898858, -0.2132136, 0.20443119, 0.031015461, 0.52534705, 0.33663183, -0.3693474, 0.482685, -0.36124155], [-0.12777855, -0.20550819, 0.28839538, 0.10256641, 0.46168828, 0.28442463, 0.13932216, -0.2666212, -0.4973028, -0.45955005]]\r\n",
" - bias: [0.005777407, 0.009588705, 0.002633743, 0.009360885, 0.009991019, 0.020499641, 0.007968125, 0.007711372, 0.016681366, 0.0003300733]\r\n",
" - activation: (Function)\r\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "N6VgpKPSCIG8",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment