Last active
May 4, 2020 22:01
-
-
Save golden0080/0087ecd517d03fd12ed4d74f031d21cd to your computer and use it in GitHub Desktop.
39093.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nbformat": 4, | |
| "nbformat_minor": 0, | |
| "metadata": { | |
| "colab": { | |
| "name": "39093.ipynb", | |
| "provenance": [], | |
| "collapsed_sections": [], | |
| "include_colab_link": true | |
| }, | |
| "kernelspec": { | |
| "name": "python3", | |
| "display_name": "Python 3" | |
| } | |
| }, | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": { | |
| "id": "view-in-github", | |
| "colab_type": "text" | |
| }, | |
| "source": [ | |
| "<a href=\"https://colab.research.google.com/gist/golden0080/0087ecd517d03fd12ed4d74f031d21cd/39093.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "id": "MLQ20Vhq0NIH", | |
| "colab_type": "code", | |
| "outputId": "bdc83817-7cb0-4829-a501-05bac490a99a", | |
| "colab": { | |
| "base_uri": "https://localhost:8080/", | |
| "height": 357 | |
| } | |
| }, | |
| "source": [ | |
| "pip install tensorflow==1.14" | |
| ], | |
| "execution_count": 1, | |
| "outputs": [ | |
| { | |
| "output_type": "stream", | |
| "text": [ | |
| "Requirement already satisfied: tensorflow==1.14 in /usr/local/lib/python3.6/dist-packages (1.14.0)\n", | |
| "Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.12.1)\n", | |
| "Requirement already satisfied: tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.14.0)\n", | |
| "Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.28.1)\n", | |
| "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (0.34.2)\n", | |
| "Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (0.2.0)\n", | |
| "Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (0.2.2)\n", | |
| "Requirement already satisfied: numpy<2.0,>=1.14.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.18.3)\n", | |
| "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.12.0)\n", | |
| "Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (3.10.0)\n", | |
| "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.1.0)\n", | |
| "Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.0.8)\n", | |
| "Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (0.8.1)\n", | |
| "Requirement already satisfied: tensorboard<1.15.0,>=1.14.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.14.0)\n", | |
| "Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (0.9.0)\n", | |
| "Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.14) (1.1.0)\n", | |
| "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf>=3.6.1->tensorflow==1.14) (46.1.3)\n", | |
| "Requirement already satisfied: h5py in /usr/local/lib/python3.6/dist-packages (from keras-applications>=1.0.6->tensorflow==1.14) (2.10.0)\n", | |
| "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14) (3.2.1)\n", | |
| "Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14) (1.0.1)\n" | |
| ], | |
| "name": "stdout" | |
| } | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "id": "IZuZhHOT9O__", | |
| "colab_type": "code", | |
| "colab": {} | |
| }, | |
| "source": [ | |
| "import os\n", | |
| "\n", | |
| "os.environ[\"AUTOGRAPH_VERBOSITY\"] = \"10\"" | |
| ], | |
| "execution_count": 0, | |
| "outputs": [] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "id": "i2ldbzXl_cbA", | |
| "colab_type": "code", | |
| "outputId": "eaeb457a-18dc-4ae8-a84f-882eea4f0374", | |
| "colab": { | |
| "base_uri": "https://localhost:8080/", | |
| "height": 1000 | |
| } | |
| }, | |
| "source": [ | |
| "import tensorflow as tf\n", | |
| "\n", | |
| "import numpy as np\n", | |
| "from tensorflow.python.ops import math_ops\n", | |
| "from tensorflow.python import keras\n", | |
| "\n", | |
| "class MyLayer(keras.layers.Layer):\n", | |
| "\n", | |
| " def call(self, inputs, training=None):\n", | |
| " # Expecting training to be set\n", | |
| " if training is not None:\n", | |
| " self.add_loss(math_ops.reduce_sum(inputs))\n", | |
| "\n", | |
| " return inputs\n", | |
| "\n", | |
| "\n", | |
| "inputs = keras.Input((3,))\n", | |
| "layer = MyLayer()\n", | |
| "outputs = layer(inputs)\n", | |
| "model = keras.Model(inputs, outputs)\n", | |
| "model.compile('sgd', 'mse', run_eagerly=False)\n", | |
| "loss = model.fit(np.ones((2, 3)), np.ones((2, 3)))\n", | |
| "\n", | |
| "print(loss.history)" | |
| ], | |
| "execution_count": 3, | |
| "outputs": [ | |
| { | |
| "output_type": "stream", | |
| "text": [ | |
| "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n" | |
| ], | |
| "name": "stderr" | |
| }, | |
| { | |
| "output_type": "stream", | |
| "text": [ | |
| "INFO:tensorflow:Converted call: <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>> \n", | |
| " args: (<tf.Tensor 'input_1:0' shape=(?, 3) dtype=float32>,)\n", | |
| " kwargs: {}\n", | |
| "\n", | |
| "Converted call: <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>> \n", | |
| " args: (<tf.Tensor 'input_1:0' shape=(?, 3) dtype=float32>,)\n", | |
| " kwargs: {}\n", | |
| "\n", | |
| "INFO:tensorflow:Entity <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>> is not cached for key <code object call at 0x7f9248e65420, file \"<ipython-input-3-f79ad338da3a>\", line 9> subkey (<tensorflow.python.autograph.core.converter.ConversionOptions object at 0x7f922469b080>, frozenset())\n", | |
| "Entity <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>> is not cached for key <code object call at 0x7f9248e65420, file \"<ipython-input-3-f79ad338da3a>\", line 9> subkey (<tensorflow.python.autograph.core.converter.ConversionOptions object at 0x7f922469b080>, frozenset())\n", | |
| "INFO:tensorflow:Converting <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>\n", | |
| "Converting <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>\n", | |
| "INFO:tensorflow:Source code of <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>:\n", | |
| "\n", | |
| "def call(self, inputs, training=None):\n", | |
| " # Expecting training to be set\n", | |
| " if training is not None:\n", | |
| " self.add_loss(math_ops.reduce_sum(inputs))\n", | |
| "\n", | |
| " return inputs\n", | |
| "\n", | |
| "\n", | |
| "Source code of <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>:\n", | |
| "\n", | |
| "def call(self, inputs, training=None):\n", | |
| " # Expecting training to be set\n", | |
| " if training is not None:\n", | |
| " self.add_loss(math_ops.reduce_sum(inputs))\n", | |
| "\n", | |
| " return inputs\n", | |
| "\n", | |
| "\n", | |
| "INFO:tensorflow:Compiled output of <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>:\n", | |
| "\n", | |
| "def tf__call(self, inputs, training=None):\n", | |
| " do_return = False\n", | |
| " retval_ = ag__.UndefinedReturnValue()\n", | |
| " cond = training is not None\n", | |
| "\n", | |
| " def get_state():\n", | |
| " return ()\n", | |
| "\n", | |
| " def set_state(_):\n", | |
| " pass\n", | |
| "\n", | |
| " def if_true():\n", | |
| " ag__.converted_call('add_loss', self, ag__.ConversionOptions(recursive=True, force_conversion=False, optional_features=(), internal_convert_user_code=True), (ag__.converted_call('reduce_sum', math_ops, ag__.ConversionOptions(recursive=True, force_conversion=False, optional_features=(), internal_convert_user_code=True), (inputs,), None),), None)\n", | |
| " return ag__.match_staging_level(1, cond)\n", | |
| "\n", | |
| " def if_false():\n", | |
| " return ag__.match_staging_level(1, cond)\n", | |
| " ag__.if_stmt(cond, if_true, if_false, get_state, set_state)\n", | |
| " do_return = True\n", | |
| " retval_ = inputs\n", | |
| " cond_1 = ag__.is_undefined_return(retval_)\n", | |
| "\n", | |
| " def get_state_1():\n", | |
| " return ()\n", | |
| "\n", | |
| " def set_state_1(_):\n", | |
| " pass\n", | |
| "\n", | |
| " def if_true_1():\n", | |
| " retval_ = None\n", | |
| " return retval_\n", | |
| "\n", | |
| " def if_false_1():\n", | |
| " return retval_\n", | |
| " retval_ = ag__.if_stmt(cond_1, if_true_1, if_false_1, get_state_1, set_state_1)\n", | |
| " return retval_\n", | |
| "\n", | |
| "\n", | |
| "Compiled output of <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>:\n", | |
| "\n", | |
| "def tf__call(self, inputs, training=None):\n", | |
| " do_return = False\n", | |
| " retval_ = ag__.UndefinedReturnValue()\n", | |
| " cond = training is not None\n", | |
| "\n", | |
| " def get_state():\n", | |
| " return ()\n", | |
| "\n", | |
| " def set_state(_):\n", | |
| " pass\n", | |
| "\n", | |
| " def if_true():\n", | |
| " ag__.converted_call('add_loss', self, ag__.ConversionOptions(recursive=True, force_conversion=False, optional_features=(), internal_convert_user_code=True), (ag__.converted_call('reduce_sum', math_ops, ag__.ConversionOptions(recursive=True, force_conversion=False, optional_features=(), internal_convert_user_code=True), (inputs,), None),), None)\n", | |
| " return ag__.match_staging_level(1, cond)\n", | |
| "\n", | |
| " def if_false():\n", | |
| " return ag__.match_staging_level(1, cond)\n", | |
| " ag__.if_stmt(cond, if_true, if_false, get_state, set_state)\n", | |
| " do_return = True\n", | |
| " retval_ = inputs\n", | |
| " cond_1 = ag__.is_undefined_return(retval_)\n", | |
| "\n", | |
| " def get_state_1():\n", | |
| " return ()\n", | |
| "\n", | |
| " def set_state_1(_):\n", | |
| " pass\n", | |
| "\n", | |
| " def if_true_1():\n", | |
| " retval_ = None\n", | |
| " return retval_\n", | |
| "\n", | |
| " def if_false_1():\n", | |
| " return retval_\n", | |
| " retval_ = ag__.if_stmt(cond_1, if_true_1, if_false_1, get_state_1, set_state_1)\n", | |
| " return retval_\n", | |
| "\n", | |
| "\n", | |
| "INFO:tensorflow:Compiled AST of <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>:\n", | |
| "\n", | |
| "FunctionDef:\n", | |
| "| name=u\"tf__call\"\n", | |
| "| args=arguments:\n", | |
| "| | args=[\n", | |
| "| | | Name:\n", | |
| "| | | | id=u\"self\"\n", | |
| "| | | | ctx=Param()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:13, QN: self, DEFINITIONS: (AnnotatedDef[140265652225472],), ORIG_DEFINITIONS: (AnnotatedDef[140265652958320],)}\n", | |
| "| | | Name:\n", | |
| "| | | | id=u\"inputs\"\n", | |
| "| | | | ctx=Param()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:19, QN: inputs, DEFINITIONS: (AnnotatedDef[140265652225584],), ORIG_DEFINITIONS: (AnnotatedDef[140265652958432],)}\n", | |
| "| | | Name:\n", | |
| "| | | | id=u\"training\"\n", | |
| "| | | | ctx=Param()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:27, QN: training, DEFINITIONS: (AnnotatedDef[140265652225528],), ORIG_DEFINITIONS: (AnnotatedDef[140265652957760],)}\n", | |
| "| | ]\n", | |
| "| | vararg=None\n", | |
| "| | kwonlyargs=[]\n", | |
| "| | kw_defaults=[]\n", | |
| "| | kwarg=None\n", | |
| "| | defaults=[\n", | |
| "| | | NameConstant:\n", | |
| "| | | | value=None\n", | |
| "| | ]\n", | |
| "| | ___pyct_anno={SCOPE: Scope{r=(), w=(self, training, inputs)}}\n", | |
| "| body=[\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"do_return\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: do_return, DEFINITIONS: (AnnotatedDef[140265652862816],)}\n", | |
| "| | | ]\n", | |
| "| | | value=NameConstant:\n", | |
| "| | | | value=False\n", | |
| "| | | ___pyct_anno={SCOPE: Scope{r=(), w=(do_return,)}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.UndefinedReturnValue, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, training, ag__.match_staging_level, ag__.if_stmt})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"retval_\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652859568],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"UndefinedReturnValue\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.UndefinedReturnValue}\n", | |
| "| | | | args=[]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | ___pyct_anno={SCOPE: Scope{r=(ag__.UndefinedReturnValue, ag__), w=(retval_,)}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.UndefinedReturnValue, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, training, ag__.match_staging_level, ag__.if_stmt})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"cond\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Compare:\n", | |
| "| | | | left=Name:\n", | |
| "| | | | | id=u\"training\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652957760],), ORIGIN: <ipython-input-3-f79ad338da3a>:11:11, QN: training, DEFINITIONS: (AnnotatedDef[140265652225528],)}\n", | |
| "| | | | ops=[\n", | |
| "| | | | | IsNot()\n", | |
| "| | | | ]\n", | |
| "| | | | comparators=[\n", | |
| "| | | | | NameConstant:\n", | |
| "| | | | | | value=None\n", | |
| "| | | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:27}\n", | |
| "| | | | ]\n", | |
| "| | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:11}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(training,), w=(cond,)}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, ag__.match_staging_level, training, inputs, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"get_state\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Tuple:\n", | |
| "| | | | | | elts=[]\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(get_state,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, cond, ag__.match_staging_level, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"set_state\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"_\"\n", | |
| "| | | | | | ctx=Param()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: _, DEFINITIONS: (AnnotatedDef[140265652227768],)}\n", | |
| "| | | | ]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=(_,)}}\n", | |
| "| | | body=[\n", | |
| "| | | | Pass:\n", | |
| "| | | | | ___pyct_anno={LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(set_state,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, get_state, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, ag__.match_staging_level, cond, inputs, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_true\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Expr:\n", | |
| "| | | | | value=Call:\n", | |
| "| | | | | | func=Attribute:\n", | |
| "| | | | | | | value=Name:\n", | |
| "| | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | attr=u\"converted_call\"\n", | |
| "| | | | | | | ctx=Load()\n", | |
| "| | | | | | | ___pyct_anno={QN: ag__.converted_call}\n", | |
| "| | | | | | args=[\n", | |
| "| | | | | | | Str:\n", | |
| "| | | | | | | | s=u\"add_loss\"\n", | |
| "| | | | | | | Name:\n", | |
| "| | | | | | | | id=u\"self\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652958320],), ORIGIN: <ipython-input-3-f79ad338da3a>:12:12, QN: self, DEFINITIONS: (AnnotatedDef[140265652225472],)}\n", | |
| "| | | | | | | Call:\n", | |
| "| | | | | | | | func=Attribute:\n", | |
| "| | | | | | | | | value=Name:\n", | |
| "| | | | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | attr=u\"ConversionOptions\"\n", | |
| "| | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | ___pyct_anno={QN: ag__.ConversionOptions}\n", | |
| "| | | | | | | | args=[]\n", | |
| "| | | | | | | | keywords=[\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"recursive\"\n", | |
| "| | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | value=True\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"force_conversion\"\n", | |
| "| | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | value=False\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"optional_features\"\n", | |
| "| | | | | | | | | | value=Tuple:\n", | |
| "| | | | | | | | | | | elts=[]\n", | |
| "| | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"internal_convert_user_code\"\n", | |
| "| | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | value=True\n", | |
| "| | | | | | | | ]\n", | |
| "| | | | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | | | | | Tuple:\n", | |
| "| | | | | | | | elts=[\n", | |
| "| | | | | | | | | Call:\n", | |
| "| | | | | | | | | | func=Attribute:\n", | |
| "| | | | | | | | | | | value=Name:\n", | |
| "| | | | | | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | | | attr=u\"converted_call\"\n", | |
| "| | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | ___pyct_anno={QN: ag__.converted_call}\n", | |
| "| | | | | | | | | | args=[\n", | |
| "| | | | | | | | | | | Str:\n", | |
| "| | | | | | | | | | | | s=u\"reduce_sum\"\n", | |
| "| | | | | | | | | | | Name:\n", | |
| "| | | | | | | | | | | | id=u\"math_ops\"\n", | |
| "| | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | ___pyct_anno={ORIG_DEFINITIONS: (), ORIGIN: <ipython-input-3-f79ad338da3a>:12:26, QN: math_ops, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | | | Call:\n", | |
| "| | | | | | | | | | | | func=Attribute:\n", | |
| "| | | | | | | | | | | | | value=Name:\n", | |
| "| | | | | | | | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | | | | | attr=u\"ConversionOptions\"\n", | |
| "| | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | ___pyct_anno={QN: ag__.ConversionOptions}\n", | |
| "| | | | | | | | | | | | args=[]\n", | |
| "| | | | | | | | | | | | keywords=[\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"recursive\"\n", | |
| "| | | | | | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | | | | | value=True\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"force_conversion\"\n", | |
| "| | | | | | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | | | | | value=False\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"optional_features\"\n", | |
| "| | | | | | | | | | | | | | value=Tuple:\n", | |
| "| | | | | | | | | | | | | | | elts=[]\n", | |
| "| | | | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"internal_convert_user_code\"\n", | |
| "| | | | | | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | | | | | value=True\n", | |
| "| | | | | | | | | | | | ]\n", | |
| "| | | | | | | | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | | | | | | | | | Tuple:\n", | |
| "| | | | | | | | | | | | elts=[\n", | |
| "| | | | | | | | | | | | | Name:\n", | |
| "| | | | | | | | | | | | | | id=u\"inputs\"\n", | |
| "| | | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652958432],), ORIGIN: <ipython-input-3-f79ad338da3a>:12:46, QN: inputs, DEFINITIONS: (AnnotatedDef[140265652225584],)}\n", | |
| "| | | | | | | | | | | | ]\n", | |
| "| | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | NameConstant:\n", | |
| "| | | | | | | | | | | | value=None\n", | |
| "| | | | | | | | | | ]\n", | |
| "| | | | | | | | | | keywords=[]\n", | |
| "| | | | | | | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:12:26, ARGS_SCOPE: Scope{r=(inputs, ag__.ConversionOptions, math_ops, ag__), w=()}}\n", | |
| "| | | | | | | | ]\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | NameConstant:\n", | |
| "| | | | | | | | value=None\n", | |
| "| | | | | | ]\n", | |
| "| | | | | | keywords=[]\n", | |
| "| | | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:12:12, ARGS_SCOPE: Scope{r=(self, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, inputs), w=()}}\n", | |
| "| | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:12:12, SCOPE: Scope{r=(self, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, inputs), w=()}, LIVE_VARS_OUT: frozenset({cond, ag__.match_staging_level, ag__}), LIVE_VARS_IN: frozenset({self, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, cond, ag__.match_staging_level})}\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Call:\n", | |
| "| | | | | | func=Attribute:\n", | |
| "| | | | | | | value=Name:\n", | |
| "| | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | attr=u\"match_staging_level\"\n", | |
| "| | | | | | | ctx=Load()\n", | |
| "| | | | | | | ___pyct_anno={QN: ag__.match_staging_level}\n", | |
| "| | | | | | args=[\n", | |
| "| | | | | | | Num:\n", | |
| "| | | | | | | | n=1\n", | |
| "| | | | | | | Name:\n", | |
| "| | | | | | | | id=u\"cond\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | | | | ]\n", | |
| "| | | | | | keywords=[]\n", | |
| "| | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(cond,), w=()}}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(cond, ag__.match_staging_level, ag__), w=()}, LIVE_VARS_IN: frozenset({cond, ag__.match_staging_level, ag__})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(if_true,)}, BODY_SCOPE: Scope{r=(self, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, ag__.match_staging_level, cond, inputs), w=()}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, get_state, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, cond, ag__.match_staging_level, ag__.if_stmt, set_state})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_false\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Call:\n", | |
| "| | | | | | func=Attribute:\n", | |
| "| | | | | | | value=Name:\n", | |
| "| | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | attr=u\"match_staging_level\"\n", | |
| "| | | | | | | ctx=Load()\n", | |
| "| | | | | | | ___pyct_anno={QN: ag__.match_staging_level}\n", | |
| "| | | | | | args=[\n", | |
| "| | | | | | | Num:\n", | |
| "| | | | | | | | n=1\n", | |
| "| | | | | | | Name:\n", | |
| "| | | | | | | | id=u\"cond\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | | | | ]\n", | |
| "| | | | | | keywords=[]\n", | |
| "| | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(cond,), w=()}}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(cond, ag__.match_staging_level, ag__), w=()}, LIVE_VARS_IN: frozenset({cond, ag__.match_staging_level, ag__})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(if_false,)}, BODY_SCOPE: Scope{r=(cond, ag__.match_staging_level, ag__), w=()}, LIVE_VARS_IN: frozenset({if_true, ag__.is_undefined_return, get_state, inputs, ag__, cond, ag__.match_staging_level, ag__.if_stmt, set_state})}\n", | |
| "| | Expr:\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"if_stmt\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.if_stmt}\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"cond\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_true\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_true, DEFINITIONS: (AnnotatedDef[140265652958824],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_false\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_false, DEFINITIONS: (AnnotatedDef[140265652959944],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"get_state\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: get_state, DEFINITIONS: (AnnotatedDef[140265652860072],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"set_state\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: set_state, DEFINITIONS: (AnnotatedDef[140265652859400],)}\n", | |
| "| | | | ]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(if_true, if_false, get_state, cond, set_state), w=()}}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(if_true, if_false, get_state, ag__, cond, ag__.if_stmt, set_state), w=()}, LIVE_VARS_OUT: frozenset({ag__.is_undefined_return, inputs, ag__.if_stmt, ag__}), LIVE_VARS_IN: frozenset({if_true, if_false, ag__.is_undefined_return, get_state, ag__, cond, inputs, ag__.if_stmt, set_state})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"do_return\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: do_return, DEFINITIONS: (AnnotatedDef[140265652961232],)}\n", | |
| "| | | ]\n", | |
| "| | | value=NameConstant:\n", | |
| "| | | | value=True\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:14:8, SCOPE: Scope{r=(), w=(do_return,)}, LIVE_VARS_IN: frozenset({ag__.is_undefined_return, inputs, ag__.if_stmt, ag__})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"retval_\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652960000],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Name:\n", | |
| "| | | | id=u\"inputs\"\n", | |
| "| | | | ctx=Load()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652958432],), ORIGIN: <ipython-input-3-f79ad338da3a>:14:15, QN: inputs, DEFINITIONS: (AnnotatedDef[140265652225584],)}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:14:8, SCOPE: Scope{r=(inputs,), w=(retval_,)}, LIVE_VARS_IN: frozenset({ag__.is_undefined_return, inputs, ag__.if_stmt, ag__})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"cond_1\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: cond_1, DEFINITIONS: (AnnotatedDef[140265652958376],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"is_undefined_return\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.is_undefined_return}\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"retval_\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652960000],)}\n", | |
| "| | | | ]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(retval_,), w=()}}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(ag__.is_undefined_return, retval_, ag__), w=(cond_1,)}, LIVE_VARS_IN: frozenset({ag__.is_undefined_return, retval_, ag__.if_stmt, ag__})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"get_state_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Tuple:\n", | |
| "| | | | | | elts=[]\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(get_state_1,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({cond_1, retval_, ag__.if_stmt, ag__})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"set_state_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"_\"\n", | |
| "| | | | | | ctx=Param()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: _, DEFINITIONS: (AnnotatedDef[140265652227936],)}\n", | |
| "| | | | ]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=(_,)}}\n", | |
| "| | | body=[\n", | |
| "| | | | Pass:\n", | |
| "| | | | | ___pyct_anno={LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(set_state_1,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({get_state_1, ag__, cond_1, retval_, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_true_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Assign:\n", | |
| "| | | | | targets=[\n", | |
| "| | | | | | Name:\n", | |
| "| | | | | | | id=u\"retval_\"\n", | |
| "| | | | | | | ctx=Store()\n", | |
| "| | | | | | | annotation=None\n", | |
| "| | | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652959440],)}\n", | |
| "| | | | | ]\n", | |
| "| | | | | value=NameConstant:\n", | |
| "| | | | | | value=None\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(), w=(retval_,)}, LIVE_VARS_IN: frozenset()}\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"retval_\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652959440],)}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({retval_})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(if_true_1,)}, BODY_SCOPE: Scope{r=(retval_,), w=(retval_,)}, LIVE_VARS_IN: frozenset({set_state_1, get_state_1, ag__, cond_1, retval_, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_false_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"retval_\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652960000],)}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({retval_})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(if_false_1,)}, BODY_SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({set_state_1, get_state_1, ag__, cond_1, if_true_1, retval_, ag__.if_stmt})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"retval_\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652510392],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"if_stmt\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.if_stmt}\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"cond_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: cond_1, DEFINITIONS: (AnnotatedDef[140265652958376],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_true_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_true_1, DEFINITIONS: (AnnotatedDef[140265652959664],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_false_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_false_1, DEFINITIONS: (AnnotatedDef[140265652959384],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"get_state_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: get_state_1, DEFINITIONS: (AnnotatedDef[140265652959272],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"set_state_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: set_state_1, DEFINITIONS: (AnnotatedDef[140265652957648],)}\n", | |
| "| | | | ]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(set_state_1, if_true_1, get_state_1, if_false_1, cond_1), w=()}}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(set_state_1, if_true_1, get_state_1, if_false_1, ag__, cond_1, ag__.if_stmt), w=(retval_,)}, LIVE_VARS_IN: frozenset({set_state_1, get_state_1, if_false_1, ag__, cond_1, if_true_1, ag__.if_stmt})}\n", | |
| "| | Return:\n", | |
| "| | | value=Name:\n", | |
| "| | | | id=u\"retval_\"\n", | |
| "| | | | ctx=Load()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652510392],)}\n", | |
| "| | | ___pyct_anno={SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({retval_})}\n", | |
| "| ]\n", | |
| "| decorator_list=[]\n", | |
| "| returns=None\n", | |
| "| ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(call,)}, BODY_SCOPE: Scope{r=(ag__.is_undefined_return, ag__.converted_call, ag__, self, set_state_1, if_false_1, cond_1, if_false, ag__.UndefinedReturnValue, get_state, ag__.ConversionOptions, training, inputs, if_true, if_true_1, get_state_1, math_ops, cond, ag__.match_staging_level, retval_, ag__.if_stmt, set_state), w=(if_true, if_false, set_state_1, get_state, if_true_1, cond_1, get_state_1, if_false_1, cond, retval_, do_return, set_state)}}\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "Compiled AST of <bound method MyLayer.call of <__main__.MyLayer object at 0x7f923b972ac8>>:\n", | |
| "\n", | |
| "FunctionDef:\n", | |
| "| name=u\"tf__call\"\n", | |
| "| args=arguments:\n", | |
| "| | args=[\n", | |
| "| | | Name:\n", | |
| "| | | | id=u\"self\"\n", | |
| "| | | | ctx=Param()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:13, QN: self, DEFINITIONS: (AnnotatedDef[140265652225472],), ORIG_DEFINITIONS: (AnnotatedDef[140265652958320],)}\n", | |
| "| | | Name:\n", | |
| "| | | | id=u\"inputs\"\n", | |
| "| | | | ctx=Param()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:19, QN: inputs, DEFINITIONS: (AnnotatedDef[140265652225584],), ORIG_DEFINITIONS: (AnnotatedDef[140265652958432],)}\n", | |
| "| | | Name:\n", | |
| "| | | | id=u\"training\"\n", | |
| "| | | | ctx=Param()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:27, QN: training, DEFINITIONS: (AnnotatedDef[140265652225528],), ORIG_DEFINITIONS: (AnnotatedDef[140265652957760],)}\n", | |
| "| | ]\n", | |
| "| | vararg=None\n", | |
| "| | kwonlyargs=[]\n", | |
| "| | kw_defaults=[]\n", | |
| "| | kwarg=None\n", | |
| "| | defaults=[\n", | |
| "| | | NameConstant:\n", | |
| "| | | | value=None\n", | |
| "| | ]\n", | |
| "| | ___pyct_anno={SCOPE: Scope{r=(), w=(self, training, inputs)}}\n", | |
| "| body=[\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"do_return\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: do_return, DEFINITIONS: (AnnotatedDef[140265652862816],)}\n", | |
| "| | | ]\n", | |
| "| | | value=NameConstant:\n", | |
| "| | | | value=False\n", | |
| "| | | ___pyct_anno={SCOPE: Scope{r=(), w=(do_return,)}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.UndefinedReturnValue, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, training, ag__.match_staging_level, ag__.if_stmt})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"retval_\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652859568],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"UndefinedReturnValue\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.UndefinedReturnValue}\n", | |
| "| | | | args=[]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | ___pyct_anno={SCOPE: Scope{r=(ag__.UndefinedReturnValue, ag__), w=(retval_,)}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.UndefinedReturnValue, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, training, ag__.match_staging_level, ag__.if_stmt})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"cond\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Compare:\n", | |
| "| | | | left=Name:\n", | |
| "| | | | | id=u\"training\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652957760],), ORIGIN: <ipython-input-3-f79ad338da3a>:11:11, QN: training, DEFINITIONS: (AnnotatedDef[140265652225528],)}\n", | |
| "| | | | ops=[\n", | |
| "| | | | | IsNot()\n", | |
| "| | | | ]\n", | |
| "| | | | comparators=[\n", | |
| "| | | | | NameConstant:\n", | |
| "| | | | | | value=None\n", | |
| "| | | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:27}\n", | |
| "| | | | ]\n", | |
| "| | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:11}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(training,), w=(cond,)}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, ag__.match_staging_level, training, inputs, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"get_state\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Tuple:\n", | |
| "| | | | | | elts=[]\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(get_state,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, cond, ag__.match_staging_level, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"set_state\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"_\"\n", | |
| "| | | | | | ctx=Param()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: _, DEFINITIONS: (AnnotatedDef[140265652227768],)}\n", | |
| "| | | | ]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=(_,)}}\n", | |
| "| | | body=[\n", | |
| "| | | | Pass:\n", | |
| "| | | | | ___pyct_anno={LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(set_state,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, get_state, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, ag__.match_staging_level, cond, inputs, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_true\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Expr:\n", | |
| "| | | | | value=Call:\n", | |
| "| | | | | | func=Attribute:\n", | |
| "| | | | | | | value=Name:\n", | |
| "| | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | attr=u\"converted_call\"\n", | |
| "| | | | | | | ctx=Load()\n", | |
| "| | | | | | | ___pyct_anno={QN: ag__.converted_call}\n", | |
| "| | | | | | args=[\n", | |
| "| | | | | | | Str:\n", | |
| "| | | | | | | | s=u\"add_loss\"\n", | |
| "| | | | | | | Name:\n", | |
| "| | | | | | | | id=u\"self\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652958320],), ORIGIN: <ipython-input-3-f79ad338da3a>:12:12, QN: self, DEFINITIONS: (AnnotatedDef[140265652225472],)}\n", | |
| "| | | | | | | Call:\n", | |
| "| | | | | | | | func=Attribute:\n", | |
| "| | | | | | | | | value=Name:\n", | |
| "| | | | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | attr=u\"ConversionOptions\"\n", | |
| "| | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | ___pyct_anno={QN: ag__.ConversionOptions}\n", | |
| "| | | | | | | | args=[]\n", | |
| "| | | | | | | | keywords=[\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"recursive\"\n", | |
| "| | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | value=True\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"force_conversion\"\n", | |
| "| | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | value=False\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"optional_features\"\n", | |
| "| | | | | | | | | | value=Tuple:\n", | |
| "| | | | | | | | | | | elts=[]\n", | |
| "| | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | arg=u\"internal_convert_user_code\"\n", | |
| "| | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | value=True\n", | |
| "| | | | | | | | ]\n", | |
| "| | | | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | | | | | Tuple:\n", | |
| "| | | | | | | | elts=[\n", | |
| "| | | | | | | | | Call:\n", | |
| "| | | | | | | | | | func=Attribute:\n", | |
| "| | | | | | | | | | | value=Name:\n", | |
| "| | | | | | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | | | attr=u\"converted_call\"\n", | |
| "| | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | ___pyct_anno={QN: ag__.converted_call}\n", | |
| "| | | | | | | | | | args=[\n", | |
| "| | | | | | | | | | | Str:\n", | |
| "| | | | | | | | | | | | s=u\"reduce_sum\"\n", | |
| "| | | | | | | | | | | Name:\n", | |
| "| | | | | | | | | | | | id=u\"math_ops\"\n", | |
| "| | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | ___pyct_anno={ORIG_DEFINITIONS: (), ORIGIN: <ipython-input-3-f79ad338da3a>:12:26, QN: math_ops, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | | | Call:\n", | |
| "| | | | | | | | | | | | func=Attribute:\n", | |
| "| | | | | | | | | | | | | value=Name:\n", | |
| "| | | | | | | | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | | | | | | | attr=u\"ConversionOptions\"\n", | |
| "| | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | ___pyct_anno={QN: ag__.ConversionOptions}\n", | |
| "| | | | | | | | | | | | args=[]\n", | |
| "| | | | | | | | | | | | keywords=[\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"recursive\"\n", | |
| "| | | | | | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | | | | | value=True\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"force_conversion\"\n", | |
| "| | | | | | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | | | | | value=False\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"optional_features\"\n", | |
| "| | | | | | | | | | | | | | value=Tuple:\n", | |
| "| | | | | | | | | | | | | | | elts=[]\n", | |
| "| | | | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | keyword:\n", | |
| "| | | | | | | | | | | | | | arg=u\"internal_convert_user_code\"\n", | |
| "| | | | | | | | | | | | | | value=NameConstant:\n", | |
| "| | | | | | | | | | | | | | | value=True\n", | |
| "| | | | | | | | | | | | ]\n", | |
| "| | | | | | | | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | | | | | | | | | Tuple:\n", | |
| "| | | | | | | | | | | | elts=[\n", | |
| "| | | | | | | | | | | | | Name:\n", | |
| "| | | | | | | | | | | | | | id=u\"inputs\"\n", | |
| "| | | | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | | | | annotation=None\n", | |
| "| | | | | | | | | | | | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652958432],), ORIGIN: <ipython-input-3-f79ad338da3a>:12:46, QN: inputs, DEFINITIONS: (AnnotatedDef[140265652225584],)}\n", | |
| "| | | | | | | | | | | | ]\n", | |
| "| | | | | | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | | | | NameConstant:\n", | |
| "| | | | | | | | | | | | value=None\n", | |
| "| | | | | | | | | | ]\n", | |
| "| | | | | | | | | | keywords=[]\n", | |
| "| | | | | | | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:12:26, ARGS_SCOPE: Scope{r=(inputs, ag__.ConversionOptions, math_ops, ag__), w=()}}\n", | |
| "| | | | | | | | ]\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | NameConstant:\n", | |
| "| | | | | | | | value=None\n", | |
| "| | | | | | ]\n", | |
| "| | | | | | keywords=[]\n", | |
| "| | | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:12:12, ARGS_SCOPE: Scope{r=(self, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, inputs), w=()}}\n", | |
| "| | | | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:12:12, SCOPE: Scope{r=(self, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, inputs), w=()}, LIVE_VARS_OUT: frozenset({cond, ag__.match_staging_level, ag__}), LIVE_VARS_IN: frozenset({self, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, cond, ag__.match_staging_level})}\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Call:\n", | |
| "| | | | | | func=Attribute:\n", | |
| "| | | | | | | value=Name:\n", | |
| "| | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | attr=u\"match_staging_level\"\n", | |
| "| | | | | | | ctx=Load()\n", | |
| "| | | | | | | ___pyct_anno={QN: ag__.match_staging_level}\n", | |
| "| | | | | | args=[\n", | |
| "| | | | | | | Num:\n", | |
| "| | | | | | | | n=1\n", | |
| "| | | | | | | Name:\n", | |
| "| | | | | | | | id=u\"cond\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | | | | ]\n", | |
| "| | | | | | keywords=[]\n", | |
| "| | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(cond,), w=()}}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(cond, ag__.match_staging_level, ag__), w=()}, LIVE_VARS_IN: frozenset({cond, ag__.match_staging_level, ag__})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(if_true,)}, BODY_SCOPE: Scope{r=(self, ag__.ConversionOptions, ag__.converted_call, math_ops, ag__, ag__.match_staging_level, cond, inputs), w=()}, LIVE_VARS_IN: frozenset({self, ag__.is_undefined_return, get_state, ag__.ConversionOptions, inputs, ag__.converted_call, math_ops, ag__, cond, ag__.match_staging_level, ag__.if_stmt, set_state})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_false\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Call:\n", | |
| "| | | | | | func=Attribute:\n", | |
| "| | | | | | | value=Name:\n", | |
| "| | | | | | | | id=u\"ag__\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | | | attr=u\"match_staging_level\"\n", | |
| "| | | | | | | ctx=Load()\n", | |
| "| | | | | | | ___pyct_anno={QN: ag__.match_staging_level}\n", | |
| "| | | | | | args=[\n", | |
| "| | | | | | | Num:\n", | |
| "| | | | | | | | n=1\n", | |
| "| | | | | | | Name:\n", | |
| "| | | | | | | | id=u\"cond\"\n", | |
| "| | | | | | | | ctx=Load()\n", | |
| "| | | | | | | | annotation=None\n", | |
| "| | | | | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | | | | ]\n", | |
| "| | | | | | keywords=[]\n", | |
| "| | | | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(cond,), w=()}}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(cond, ag__.match_staging_level, ag__), w=()}, LIVE_VARS_IN: frozenset({cond, ag__.match_staging_level, ag__})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(), w=(if_false,)}, BODY_SCOPE: Scope{r=(cond, ag__.match_staging_level, ag__), w=()}, LIVE_VARS_IN: frozenset({if_true, ag__.is_undefined_return, get_state, inputs, ag__, cond, ag__.match_staging_level, ag__.if_stmt, set_state})}\n", | |
| "| | Expr:\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"if_stmt\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.if_stmt}\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"cond\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: cond, DEFINITIONS: (AnnotatedDef[140265652861864],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_true\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_true, DEFINITIONS: (AnnotatedDef[140265652958824],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_false\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_false, DEFINITIONS: (AnnotatedDef[140265652959944],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"get_state\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: get_state, DEFINITIONS: (AnnotatedDef[140265652860072],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"set_state\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: set_state, DEFINITIONS: (AnnotatedDef[140265652859400],)}\n", | |
| "| | | | ]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(if_true, if_false, get_state, cond, set_state), w=()}}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:11:8, SCOPE: Scope{r=(if_true, if_false, get_state, ag__, cond, ag__.if_stmt, set_state), w=()}, LIVE_VARS_OUT: frozenset({ag__.is_undefined_return, inputs, ag__.if_stmt, ag__}), LIVE_VARS_IN: frozenset({if_true, if_false, ag__.is_undefined_return, get_state, ag__, cond, inputs, ag__.if_stmt, set_state})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"do_return\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: do_return, DEFINITIONS: (AnnotatedDef[140265652961232],)}\n", | |
| "| | | ]\n", | |
| "| | | value=NameConstant:\n", | |
| "| | | | value=True\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:14:8, SCOPE: Scope{r=(), w=(do_return,)}, LIVE_VARS_IN: frozenset({ag__.is_undefined_return, inputs, ag__.if_stmt, ag__})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"retval_\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652960000],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Name:\n", | |
| "| | | | id=u\"inputs\"\n", | |
| "| | | | ctx=Load()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={ORIG_DEFINITIONS: (AnnotatedDef[140265652958432],), ORIGIN: <ipython-input-3-f79ad338da3a>:14:15, QN: inputs, DEFINITIONS: (AnnotatedDef[140265652225584],)}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:14:8, SCOPE: Scope{r=(inputs,), w=(retval_,)}, LIVE_VARS_IN: frozenset({ag__.is_undefined_return, inputs, ag__.if_stmt, ag__})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"cond_1\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: cond_1, DEFINITIONS: (AnnotatedDef[140265652958376],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"is_undefined_return\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.is_undefined_return}\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"retval_\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652960000],)}\n", | |
| "| | | | ]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(retval_,), w=()}}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(ag__.is_undefined_return, retval_, ag__), w=(cond_1,)}, LIVE_VARS_IN: frozenset({ag__.is_undefined_return, retval_, ag__.if_stmt, ag__})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"get_state_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Tuple:\n", | |
| "| | | | | | elts=[]\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(get_state_1,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({cond_1, retval_, ag__.if_stmt, ag__})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"set_state_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"_\"\n", | |
| "| | | | | | ctx=Param()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: _, DEFINITIONS: (AnnotatedDef[140265652227936],)}\n", | |
| "| | | | ]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=(_,)}}\n", | |
| "| | | body=[\n", | |
| "| | | | Pass:\n", | |
| "| | | | | ___pyct_anno={LIVE_VARS_IN: frozenset()}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(set_state_1,)}, BODY_SCOPE: Scope{r=(), w=()}, LIVE_VARS_IN: frozenset({get_state_1, ag__, cond_1, retval_, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_true_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Assign:\n", | |
| "| | | | | targets=[\n", | |
| "| | | | | | Name:\n", | |
| "| | | | | | | id=u\"retval_\"\n", | |
| "| | | | | | | ctx=Store()\n", | |
| "| | | | | | | annotation=None\n", | |
| "| | | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652959440],)}\n", | |
| "| | | | | ]\n", | |
| "| | | | | value=NameConstant:\n", | |
| "| | | | | | value=None\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(), w=(retval_,)}, LIVE_VARS_IN: frozenset()}\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"retval_\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652959440],)}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({retval_})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(if_true_1,)}, BODY_SCOPE: Scope{r=(retval_,), w=(retval_,)}, LIVE_VARS_IN: frozenset({set_state_1, get_state_1, ag__, cond_1, retval_, ag__.if_stmt})}\n", | |
| "| | FunctionDef:\n", | |
| "| | | name=u\"if_false_1\"\n", | |
| "| | | args=arguments:\n", | |
| "| | | | args=[]\n", | |
| "| | | | vararg=None\n", | |
| "| | | | kwonlyargs=[]\n", | |
| "| | | | kw_defaults=[]\n", | |
| "| | | | kwarg=None\n", | |
| "| | | | defaults=[]\n", | |
| "| | | | ___pyct_anno={SCOPE: Scope{r=(), w=()}}\n", | |
| "| | | body=[\n", | |
| "| | | | Return:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"retval_\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652960000],)}\n", | |
| "| | | | | ___pyct_anno={SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({retval_})}\n", | |
| "| | | ]\n", | |
| "| | | decorator_list=[]\n", | |
| "| | | returns=None\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(if_false_1,)}, BODY_SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({set_state_1, get_state_1, ag__, cond_1, if_true_1, retval_, ag__.if_stmt})}\n", | |
| "| | Assign:\n", | |
| "| | | targets=[\n", | |
| "| | | | Name:\n", | |
| "| | | | | id=u\"retval_\"\n", | |
| "| | | | | ctx=Store()\n", | |
| "| | | | | annotation=None\n", | |
| "| | | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652510392],)}\n", | |
| "| | | ]\n", | |
| "| | | value=Call:\n", | |
| "| | | | func=Attribute:\n", | |
| "| | | | | value=Name:\n", | |
| "| | | | | | id=u\"ag__\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: ag__, DEFINITIONS: ()}\n", | |
| "| | | | | attr=u\"if_stmt\"\n", | |
| "| | | | | ctx=Load()\n", | |
| "| | | | | ___pyct_anno={QN: ag__.if_stmt}\n", | |
| "| | | | args=[\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"cond_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: cond_1, DEFINITIONS: (AnnotatedDef[140265652958376],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_true_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_true_1, DEFINITIONS: (AnnotatedDef[140265652959664],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"if_false_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: if_false_1, DEFINITIONS: (AnnotatedDef[140265652959384],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"get_state_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: get_state_1, DEFINITIONS: (AnnotatedDef[140265652959272],)}\n", | |
| "| | | | | Name:\n", | |
| "| | | | | | id=u\"set_state_1\"\n", | |
| "| | | | | | ctx=Load()\n", | |
| "| | | | | | annotation=None\n", | |
| "| | | | | | ___pyct_anno={QN: set_state_1, DEFINITIONS: (AnnotatedDef[140265652957648],)}\n", | |
| "| | | | ]\n", | |
| "| | | | keywords=[]\n", | |
| "| | | | ___pyct_anno={ARGS_SCOPE: Scope{r=(set_state_1, if_true_1, get_state_1, if_false_1, cond_1), w=()}}\n", | |
| "| | | ___pyct_anno={ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(set_state_1, if_true_1, get_state_1, if_false_1, ag__, cond_1, ag__.if_stmt), w=(retval_,)}, LIVE_VARS_IN: frozenset({set_state_1, get_state_1, if_false_1, ag__, cond_1, if_true_1, ag__.if_stmt})}\n", | |
| "| | Return:\n", | |
| "| | | value=Name:\n", | |
| "| | | | id=u\"retval_\"\n", | |
| "| | | | ctx=Load()\n", | |
| "| | | | annotation=None\n", | |
| "| | | | ___pyct_anno={QN: retval_, DEFINITIONS: (AnnotatedDef[140265652510392],)}\n", | |
| "| | | ___pyct_anno={SCOPE: Scope{r=(retval_,), w=()}, LIVE_VARS_IN: frozenset({retval_})}\n", | |
| "| ]\n", | |
| "| decorator_list=[]\n", | |
| "| returns=None\n", | |
| "| ___pyct_anno={'lineno': 1, ORIGIN: <ipython-input-3-f79ad338da3a>:9:4, SCOPE: Scope{r=(), w=(call,)}, BODY_SCOPE: Scope{r=(ag__.is_undefined_return, ag__.converted_call, ag__, self, set_state_1, if_false_1, cond_1, if_false, ag__.UndefinedReturnValue, get_state, ag__.ConversionOptions, training, inputs, if_true, if_true_1, get_state_1, math_ops, cond, ag__.match_staging_level, retval_, ag__.if_stmt, set_state), w=(if_true, if_false, set_state_1, get_state, if_true_1, cond_1, get_state_1, if_false_1, cond, retval_, do_return, set_state)}}\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "INFO:tensorflow:Defaults of <function create_converted_entity_factory.<locals>.create_converted_entity.<locals>.tf__call at 0x7f922463db70> : (None,)\n", | |
| "Defaults of <function create_converted_entity_factory.<locals>.create_converted_entity.<locals>.tf__call at 0x7f922463db70> : (None,)\n", | |
| "INFO:tensorflow:Calling <function create_converted_entity_factory.<locals>.create_converted_entity.<locals>.tf__call at 0x7f922463db70> with\n", | |
| " self: <__main__.MyLayer object at 0x7f923b972ac8>\n", | |
| " inputs: Tensor(\"input_1:0\", shape=(?, 3), dtype=float32)\n", | |
| " training: None\n", | |
| "\n" | |
| ], | |
| "name": "stdout" | |
| }, | |
| { | |
| "output_type": "stream", | |
| "text": [ | |
| "/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n", | |
| "/usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", | |
| " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n" | |
| ], | |
| "name": "stderr" | |
| }, | |
| { | |
| "output_type": "stream", | |
| "text": [ | |
| "Calling <function create_converted_entity_factory.<locals>.create_converted_entity.<locals>.tf__call at 0x7f922463db70> with\n", | |
| " self: <__main__.MyLayer object at 0x7f923b972ac8>\n", | |
| " inputs: Tensor(\"input_1:0\", shape=(?, 3), dtype=float32)\n", | |
| " training: None\n", | |
| "\n", | |
| "\r2/2 [==============================] - 0s 14ms/sample - loss: 0.0000e+00\n", | |
| "{'loss': [0.0]}\n" | |
| ], | |
| "name": "stdout" | |
| } | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "metadata": { | |
| "id": "mvpeabC7_1Cf", | |
| "colab_type": "code", | |
| "colab": {} | |
| }, | |
| "source": [ | |
| "" | |
| ], | |
| "execution_count": 0, | |
| "outputs": [] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment