{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "6tzp2bPEiK_S" }, "source": [ "##### Copyright 2023 The TF-Agents Authors." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "cellView": "form", "execution": { "iopub.execute_input": "2023-12-22T12:12:13.826176Z", "iopub.status.busy": "2023-12-22T12:12:13.825931Z", "iopub.status.idle": "2023-12-22T12:12:13.829895Z", "shell.execute_reply": "2023-12-22T12:12:13.829323Z" }, "id": "E2347LPWgmcO" }, "outputs": [], "source": [ "#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# https://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License." ] }, { "cell_type": "markdown", "metadata": { "id": "0lfjAG3IiHSU" }, "source": [ "# Tutorial on Ranking in TF-Agents" ] }, { "cell_type": "markdown", "metadata": { "id": "OQJdLZ636rDN" }, "source": [ "### Get Started\n", "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", " View on TensorFlow.org\n", " \n", " \n", " \n", " Run in Google Colab\n", " \n", " \n", " \n", " View source on GitHub\n", " \n", " Download notebook\n", "
\n" ] }, { "cell_type": "markdown", "metadata": { "id": "ql6S68mZ6hMG" }, "source": [ "### Setup" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:13.833520Z", "iopub.status.busy": "2023-12-22T12:12:13.833070Z", "iopub.status.idle": "2023-12-22T12:12:25.429303Z", "shell.execute_reply": "2023-12-22T12:12:25.428218Z" }, "id": "tFs2W62pqUxk" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting tf-agents[reverb]\r\n", " Using cached tf_agents-0.19.0-py3-none-any.whl.metadata (12 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: absl-py>=0.6.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (1.4.0)\r\n", "Collecting cloudpickle>=1.3 (from tf-agents[reverb])\r\n", " Using cached cloudpickle-3.0.0-py3-none-any.whl.metadata (7.0 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting gin-config>=0.4.0 (from tf-agents[reverb])\r\n", " Using cached gin_config-0.5.0-py3-none-any.whl (61 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting gym<=0.23.0,>=0.17.0 (from tf-agents[reverb])\r\n", " Using cached gym-0.23.0-py3-none-any.whl\r\n", "Requirement already satisfied: numpy>=1.19.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (1.26.2)\r\n", "Requirement already satisfied: pillow in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (10.1.0)\r\n", "Requirement already satisfied: six>=1.10.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (1.16.0)\r\n", "Requirement already satisfied: protobuf>=3.11.3 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (3.20.3)\r\n", "Requirement already satisfied: wrapt>=1.11.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (1.14.1)\r\n", "Collecting typing-extensions==4.5.0 (from tf-agents[reverb])\r\n", " Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting pygame==2.1.3 (from tf-agents[reverb])\r\n", " Using cached pygame-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.7 MB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting tensorflow-probability~=0.23.0 (from tf-agents[reverb])\r\n", " Using cached tensorflow_probability-0.23.0-py2.py3-none-any.whl.metadata (13 kB)\r\n", "Collecting rlds (from tf-agents[reverb])\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " Downloading rlds-0.1.8-py3-none-manylinux2010_x86_64.whl (48 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting dm-reverb~=0.14.0 (from tf-agents[reverb])\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " Downloading dm_reverb-0.14.0-cp39-cp39-manylinux2014_x86_64.whl.metadata (17 kB)\r\n", "Requirement already satisfied: tensorflow~=2.15.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tf-agents[reverb]) (2.15.0.post1)\r\n", "Requirement already satisfied: dm-tree in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from dm-reverb~=0.14.0->tf-agents[reverb]) (0.1.8)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting portpicker (from dm-reverb~=0.14.0->tf-agents[reverb])\r\n", " Downloading portpicker-1.6.0-py3-none-any.whl.metadata (1.5 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting gym-notices>=0.0.4 (from gym<=0.23.0,>=0.17.0->tf-agents[reverb])\r\n", " Using cached gym_notices-0.0.8-py3-none-any.whl (3.0 kB)\r\n", "Requirement already satisfied: importlib-metadata>=4.10.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from gym<=0.23.0,>=0.17.0->tf-agents[reverb]) (7.0.0)\r\n", "Requirement already satisfied: astunparse>=1.6.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (1.6.3)\r\n", "Requirement already satisfied: flatbuffers>=23.5.26 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (23.5.26)\r\n", "Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (0.5.4)\r\n", "Requirement already satisfied: google-pasta>=0.1.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (0.2.0)\r\n", "Requirement already satisfied: h5py>=2.9.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (3.10.0)\r\n", "Requirement already satisfied: libclang>=13.0.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (16.0.6)\r\n", "Requirement already satisfied: ml-dtypes~=0.2.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (0.2.0)\r\n", "Requirement already satisfied: opt-einsum>=2.3.2 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (3.3.0)\r\n", "Requirement already satisfied: packaging in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (23.2)\r\n", "Requirement already satisfied: setuptools in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (69.0.2)\r\n", "Requirement already satisfied: termcolor>=1.1.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (2.4.0)\r\n", "Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (0.35.0)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: grpcio<2.0,>=1.24.3 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (1.60.0)\r\n", "Requirement already satisfied: tensorboard<2.16,>=2.15 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (2.15.1)\r\n", "Requirement already satisfied: tensorflow-estimator<2.16,>=2.15.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (2.15.0)\r\n", "Requirement already satisfied: keras<2.16,>=2.15.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow~=2.15.0->tf-agents[reverb]) (2.15.0)\r\n", "Requirement already satisfied: decorator in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorflow-probability~=0.23.0->tf-agents[reverb]) (5.1.1)\r\n", "Requirement already satisfied: wheel<1.0,>=0.23.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from astunparse>=1.6.0->tensorflow~=2.15.0->tf-agents[reverb]) (0.41.2)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: zipp>=0.5 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from importlib-metadata>=4.10.0->gym<=0.23.0,>=0.17.0->tf-agents[reverb]) (3.17.0)\r\n", "Requirement already satisfied: google-auth<3,>=1.6.3 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (2.25.2)\r\n", "Requirement already satisfied: google-auth-oauthlib<2,>=0.5 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (1.2.0)\r\n", "Requirement already satisfied: markdown>=2.6.8 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (3.5.1)\r\n", "Requirement already satisfied: requests<3,>=2.21.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (2.31.0)\r\n", "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (0.7.2)\r\n", "Requirement already satisfied: werkzeug>=1.0.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (3.0.1)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: psutil in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from portpicker->dm-reverb~=0.14.0->tf-agents[reverb]) (5.9.7)\r\n", "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (5.3.2)\r\n", "Requirement already satisfied: pyasn1-modules>=0.2.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (0.3.0)\r\n", "Requirement already satisfied: rsa<5,>=3.1.4 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (4.9)\r\n", "Requirement already satisfied: requests-oauthlib>=0.7.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from google-auth-oauthlib<2,>=0.5->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (1.3.1)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: charset-normalizer<4,>=2 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (3.3.2)\r\n", "Requirement already satisfied: idna<4,>=2.5 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (3.6)\r\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (2.1.0)\r\n", "Requirement already satisfied: certifi>=2017.4.17 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from requests<3,>=2.21.0->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (2023.11.17)\r\n", "Requirement already satisfied: MarkupSafe>=2.1.1 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from werkzeug>=1.0.1->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (2.1.3)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (0.5.1)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: oauthlib>=3.0.0 in /tmpfs/src/tf_docs_env/lib/python3.9/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<2,>=0.5->tensorboard<2.16,>=2.15->tensorflow~=2.15.0->tf-agents[reverb]) (3.2.2)\r\n", "Using cached cloudpickle-3.0.0-py3-none-any.whl (20 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Downloading dm_reverb-0.14.0-cp39-cp39-manylinux2014_x86_64.whl (6.4 MB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Using cached tensorflow_probability-0.23.0-py2.py3-none-any.whl (6.9 MB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Using cached tf_agents-0.19.0-py3-none-any.whl (1.4 MB)\r\n", "Downloading portpicker-1.6.0-py3-none-any.whl (16 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Installing collected packages: gym-notices, gin-config, typing-extensions, rlds, pygame, portpicker, cloudpickle, tensorflow-probability, gym, dm-reverb, tf-agents\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " Attempting uninstall: typing-extensions\r\n", " Found existing installation: typing_extensions 4.9.0\r\n", " Uninstalling typing_extensions-4.9.0:\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " Successfully uninstalled typing_extensions-4.9.0\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Successfully installed cloudpickle-3.0.0 dm-reverb-0.14.0 gin-config-0.5.0 gym-0.23.0 gym-notices-0.0.8 portpicker-1.6.0 pygame-2.1.3 rlds-0.1.8 tensorflow-probability-0.23.0 tf-agents-0.19.0 typing-extensions-4.5.0\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting tf-keras\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " Downloading tf_keras-2.15.0-py3-none-any.whl.metadata (1.6 kB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Downloading tf_keras-2.15.0-py3-none-any.whl (1.7 MB)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Installing collected packages: tf-keras\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Successfully installed tf-keras-2.15.0\r\n" ] } ], "source": [ "!pip install tf-agents[reverb]\n", "!pip install tf-keras" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:25.433782Z", "iopub.status.busy": "2023-12-22T12:12:25.433445Z", "iopub.status.idle": "2023-12-22T12:12:25.437405Z", "shell.execute_reply": "2023-12-22T12:12:25.436816Z" }, "id": "WPuD0bMEY9Iz" }, "outputs": [], "source": [ "import os\n", "# Keep using keras-2 (tf-keras) rather than keras-3 (keras).\n", "os.environ['TF_USE_LEGACY_KERAS'] = '1'" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:25.440672Z", "iopub.status.busy": "2023-12-22T12:12:25.440419Z", "iopub.status.idle": "2023-12-22T12:12:28.831833Z", "shell.execute_reply": "2023-12-22T12:12:28.830747Z" }, "id": "1dbfZarwmB96" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2023-12-22 12:12:26.469831: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", "2023-12-22 12:12:26.469877: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", "2023-12-22 12:12:26.471318: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n" ] } ], "source": [ "#@title Imports\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import tensorflow as tf\n", "\n", "from tf_agents.bandits.agents import ranking_agent\n", "from tf_agents.bandits.agents.examples.v2 import trainer\n", "from tf_agents.bandits.environments import ranking_environment\n", "from tf_agents.bandits.networks import global_and_arm_feature_network\n", "from tf_agents.environments import tf_py_environment\n", "from tf_agents.bandits.policies import ranking_policy\n", "from tf_agents.bandits.replay_buffers import bandit_replay_buffer\n", "from tf_agents.drivers import dynamic_step_driver\n", "from tf_agents.metrics import tf_metrics\n", "from tf_agents.specs import bandit_spec_utils\n", "from tf_agents.specs import tensor_spec\n", "from tf_agents.trajectories import trajectory" ] }, { "cell_type": "markdown", "metadata": { "id": "l-KqVvl_g9El" }, "source": [ "# Introduction" ] }, { "cell_type": "markdown", "metadata": { "id": "OoHE8C13g2O1" }, "source": [ "In this tutorial, we guide you through the ranking algorithms implemented as part of the TF-Agents Bandits library. In a ranking problem, in every iteration an agent is presented with a set of items, and is tasked with ranking some or all of them to a list. This ranking decision then receives some form of feedback (maybe a user does or does not click on one or more of the selected items for example). The goal of the agent is to optimize some metric/reward with the goal of making better decisions over time." ] }, { "cell_type": "markdown", "metadata": { "id": "-chVGcJVll1G" }, "source": [ "# Prerequisites" ] }, { "cell_type": "markdown", "metadata": { "id": "M92k7X27lqOM" }, "source": [ "The ranking algorithms in TF-Agents belong to a special type of bandit agents that operate on \"per-arm\" bandit problems. Hence, to be able to benefit the most from this tutorial, the reader should familiarize themselves with the [bandit](https://github.com/tensorflow/agents/tree/master/docs/tutorials/bandits_tutorial.ipynb) and the [per-arm bandit](https://github.com/tensorflow/agents/tree/master/docs/tutorials/per_arm_bandits_tutorial.ipynb) tutorials." ] }, { "cell_type": "markdown", "metadata": { "id": "o3gxWMIGvhNX" }, "source": [ "# The Ranking Problem and its Variants" ] }, { "cell_type": "markdown", "metadata": { "id": "ek9XbdjDvlFs" }, "source": [ "For this tutorial, we will use the example of presenting items for sale to users. In every iteration, we receive a set of items and possibly a number describing how many of them we should display. We assume the number of items at hand is always greater than or equal to the number of slots to place them in. We need to fill the slots in the display to maximize the probability that the user will interact with one or more of the displayed items. The user, as well as the items, are described by *features*.\n", "\n", "If we manage to put items on display that are liked by the user, the probability of user/item interactions increases. Hence, it's a good idea to learn how user-item pairs match. But how do we know if an item is liked by the user? To this end, we introduce *Feedback Types*." ] }, { "cell_type": "markdown", "metadata": { "id": "cTZ9RvYrDM2u" }, "source": [ "#Feedback Types" ] }, { "cell_type": "markdown", "metadata": { "id": "QNWZmMRoDPRX" }, "source": [ "As opposed to bandit problems where the feedback signal (the reward) is directly associated with a single chosen item, in ranking we need to consider how the feedback translates to the \"goodness\" of the displayed items. In other words, we need to assign scores to all or some of the displayed items. In our library we offer two different feedback types: *vector feedback* and *cascading feedback*." ] }, { "cell_type": "markdown", "metadata": { "id": "x5c71Vyrul4z" }, "source": [ "## Vector Feedback" ] }, { "cell_type": "markdown", "metadata": { "id": "ekcxCX-Ru8I1" }, "source": [ "In the vector feedback type, we assume that the agent receives a scalar score for every item in the output ranking. These scalars are put together in a vector in the same ordering as the output ranking. Thus the feedback is a vector of the same size as the number of elements in the ranking.\n", "\n", "This feedback type is quite straightforward in the sense that we don't need to worry about converting feedback signals to scores. On the other hand, the responsibility of scoring items falls on the designer (aka. you): it's up to the system designer to decide what scores to give based on the item, its position, and whether it was interacted with by the user." ] }, { "cell_type": "markdown", "metadata": { "id": "p9mnWzWbu3II" }, "source": [ "##Cascading Feedback" ] }, { "cell_type": "markdown", "metadata": { "id": "zUk2__0CvsLz" }, "source": [ "In the cascading feedback type (the term coined by [Craswell et al., 2008](https://dl.acm.org/doi/abs/10.1145/1341531.1341545)), we assume the user looks at the displayed items in a sequential manner, starting at the top slot. As soon as the user finds an item worthy of clicking, they click and never return to the current ranked list. They don't even look at items below the item clicked. Not clicking on any item is also a possibility, this happens when none of the displayed items are worthy of clicking. In this case, the user does look at all the items.\n", "\n", "The feedback signal is composed of two elements: The index of the chosen element, and the value of the click. Then it is the agent's task to translate this information to scores. In our implementation in the bandit library, we implemented the convention that seen but unclicked items receive some low score (typically 0 or -1), the clicked item receives the click value, and the items beyond the clicked one are ignored by the agent." ] }, { "cell_type": "markdown", "metadata": { "id": "Ey94cmzkDUP7" }, "source": [ "# Diversity and Exploration" ] }, { "cell_type": "markdown", "metadata": { "id": "7JcMNvBDDX_b" }, "source": [ "To maximize the chances of the user clicking on an item, it's not enough to just choose the highest scoring items and put them high in the ranking. For a user with a lot of different interests, they might be most interested in sports, but they also like arts and traveling. Giving all the sporty items the highest estimated scores and displaying all sporty items in the highest slots may not be optimal. The user might be in the mood for arts or traveling. Hence, it is a good idea to display a mix of the high-scoring interests. It is important to not only maximize the score of the displayed items but also make sure they form a diverse set.\n", "\n", "As with other limited-information learning problems (like bandits), it is also important to keep in mind that our decisions not only affect the immediate reward, but also the training data and future reward. If we always only display items based on their current estimated score, we might be missing out on high-scoring items that we haven't explored enough yet, and thus we are not aware of how good they are. That is, we need to incorporate exploration to our decision making process.\n", "\n", "All of the above concepts and considerations are addressed in our library. In this tutorial we walk you through the details." ] }, { "cell_type": "markdown", "metadata": { "id": "jwWucISQQSGt" }, "source": [ "# Simulating Users: Our Test Environment" ] }, { "cell_type": "markdown", "metadata": { "id": "lxLWjKe1Q2Xz" }, "source": [ "Let's dive into our codebase!\n", "\n", "First we define the environment, the class responsible for randomly generating user and item features, and give feedback after decisions." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:28.838040Z", "iopub.status.busy": "2023-12-22T12:12:28.837608Z", "iopub.status.idle": "2023-12-22T12:12:28.841655Z", "shell.execute_reply": "2023-12-22T12:12:28.840855Z" }, "id": "sR8Id9Y7mhBK" }, "outputs": [], "source": [ "feedback_model = ranking_environment.FeedbackModel.CASCADING #@param[\"ranking_environment.FeedbackModel.SCORE_VECTOR\", \"ranking_environment.FeedbackModel.CASCADING\"] {type:\"raw\"}\n" ] }, { "cell_type": "markdown", "metadata": { "id": "M38wgZHqcI-M" }, "source": [ "We also need a model for the environment to decide when to *not click*. We have two ways in our library, *distance based* and *ghost actions*.\n", "\n", "\n", "* In distance based, if the user features are not close enough to any of the item features, the user does not click.\n", "* In the ghost actions model, we set up extra imaginary actions in the form of unit vector item features. If the user chooses one of the ghost actions, it results in a no-click.\n", "\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "cellView": "form", "execution": { "iopub.execute_input": "2023-12-22T12:12:28.845049Z", "iopub.status.busy": "2023-12-22T12:12:28.844804Z", "iopub.status.idle": "2023-12-22T12:12:28.848882Z", "shell.execute_reply": "2023-12-22T12:12:28.848044Z" }, "id": "3b1hYbTxi6Kg" }, "outputs": [], "source": [ "click_type = \"ghost_actions\" #@param[\"distance_based\", \"ghost_actions\"]\n", "click_model = (ranking_environment.ClickModel.DISTANCE_BASED\n", " if click_type == \"distance_based\" else\n", " ranking_environment.ClickModel.GHOST_ACTIONS)" ] }, { "cell_type": "markdown", "metadata": { "id": "1Ut1nnmB6_9T" }, "source": [ "We are almost ready to define the ranking environment, just a couple of preparations: we define the sampling functions for the global (user) and the item features. These features will be used by the environment to simulate user behavior: a weighted inner product of the global and item features is calculated, and the probability of the user clicking is proportional to the inner product values. The weighting of the inner product is defined by `scores_weight_matrix` below." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:28.852396Z", "iopub.status.busy": "2023-12-22T12:12:28.851702Z", "iopub.status.idle": "2023-12-22T12:12:28.861986Z", "shell.execute_reply": "2023-12-22T12:12:28.861160Z" }, "id": "ueVe8Gf77Lad" }, "outputs": [], "source": [ "global_dim = 9 #@param{ type: \"integer\"}\n", "item_dim = 11 #@param{ type: \"integer\"}\n", "num_items = 50 #@param{ type: \"integer\"}\n", "num_slots = 3 #@param{ type: \"integer\"}\n", "distance_threshold = 5.0 #@param{ type: \"number\" }\n", "batch_size = 128 #@param{ type: \"integer\"}\n", "\n", "def global_sampling_fn():\n", " return np.random.randint(-1, 1, [global_dim]).astype(np.float32)\n", "\n", "def item_sampling_fn():\n", " return np.random.randint(-2, 3, [item_dim]).astype(np.float32)\n", "\n", "# Inner product with excess dimensions ignored.\n", "scores_weight_matrix = np.eye(11, 9, dtype=np.float32)\n", "\n", "env = ranking_environment.RankingPyEnvironment(\n", " global_sampling_fn,\n", " item_sampling_fn,\n", " num_items=num_items,\n", " num_slots=num_slots,\n", " scores_weight_matrix=scores_weight_matrix,\n", " feedback_model=feedback_model,\n", " click_model=click_model,\n", " distance_threshold=distance_threshold,\n", " batch_size=batch_size)\n", "\n", "# Convert the python environment to tf environment.\n", "environment = tf_py_environment.TFPyEnvironment(env)" ] }, { "cell_type": "markdown", "metadata": { "id": "wN2aFkL_qHJe" }, "source": [ "Now let's define a few different agents that will tackle the above environment! All of the agents train a network that estimates scores of item/user pairs. The difference lies in the policy, that is, how the trained network is used to make a ranking decision. The implemented policies span from just stack ranking based on scores to taking into account diversity and exploration with the ability to tune the mixture of these aspects." ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:28.865557Z", "iopub.status.busy": "2023-12-22T12:12:28.865108Z", "iopub.status.idle": "2023-12-22T12:12:28.893445Z", "shell.execute_reply": "2023-12-22T12:12:28.892549Z" }, "id": "MBJgkyFC64rR" }, "outputs": [], "source": [ "#@title Defining the Network and Training Params\n", "scoring_network = (\n", " global_and_arm_feature_network.create_feed_forward_common_tower_network(\n", " environment.observation_spec(), (20, 10), (20, 10), (20, 10)))\n", "learning_rate = 0.005 #@param{ type: \"number\"}\n", "\n", "feedback_dict = {ranking_environment.FeedbackModel.CASCADING: ranking_agent.FeedbackModel.CASCADING,\n", " ranking_environment.FeedbackModel.SCORE_VECTOR: ranking_agent.FeedbackModel.SCORE_VECTOR}\n", "agent_feedback_model = feedback_dict[feedback_model]" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:28.896827Z", "iopub.status.busy": "2023-12-22T12:12:28.896564Z", "iopub.status.idle": "2023-12-22T12:12:31.581243Z", "shell.execute_reply": "2023-12-22T12:12:31.580514Z" }, "id": "ufuiBZsg5YrR" }, "outputs": [], "source": [ "#@title Stack Ranking Deterministically by Scores\n", "\n", "policy_type = ranking_agent.RankingPolicyType.DESCENDING_SCORES\n", "descending_scores_agent = ranking_agent.RankingAgent(\n", " time_step_spec=environment.time_step_spec(),\n", " action_spec=environment.action_spec(),\n", " scoring_network=scoring_network,\n", " optimizer=tf.compat.v1.train.AdamOptimizer(learning_rate=learning_rate),\n", " feedback_model=agent_feedback_model,\n", " policy_type=policy_type,\n", " summarize_grads_and_vars=True)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:31.585722Z", "iopub.status.busy": "2023-12-22T12:12:31.585177Z", "iopub.status.idle": "2023-12-22T12:12:31.594354Z", "shell.execute_reply": "2023-12-22T12:12:31.593682Z" }, "id": "8ko9D3qO7gUs" }, "outputs": [], "source": [ "#@title Sampling Sequentially Based on Scores\n", "\n", "policy_type = ranking_agent.RankingPolicyType.NO_PENALTY\n", "logits_temperature = 1.0 #@param{ type: \"number\" }\n", "\n", "no_penalty_agent = ranking_agent.RankingAgent(\n", " time_step_spec=environment.time_step_spec(),\n", " action_spec=environment.action_spec(),\n", " scoring_network=scoring_network,\n", " optimizer=tf.compat.v1.train.AdamOptimizer(learning_rate=learning_rate),\n", " feedback_model=agent_feedback_model,\n", " policy_type=policy_type,\n", " logits_temperature=logits_temperature,\n", " summarize_grads_and_vars=True)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "cellView": "form", "execution": { "iopub.execute_input": "2023-12-22T12:12:31.597413Z", "iopub.status.busy": "2023-12-22T12:12:31.597193Z", "iopub.status.idle": "2023-12-22T12:12:31.606071Z", "shell.execute_reply": "2023-12-22T12:12:31.605491Z" }, "id": "Gnv5c4w094A4" }, "outputs": [], "source": [ "#@title Sampling Sequentally and Taking Diversity into Account\n", "#@markdown The balance between ranking based on scores and taking diversity into account is governed by the following \"penalty mixture\" parameter. A low positive value results in rankings that hardly mix in diversity, a higher value will enforce more diversity.\n", "\n", "policy_type = ranking_agent.RankingPolicyType.COSINE_DISTANCE\n", "penalty_mixture = 1.0 #@param{ type: \"number\"}\n", "\n", "cosine_distance_agent = ranking_agent.RankingAgent(\n", " time_step_spec=environment.time_step_spec(),\n", " action_spec=environment.action_spec(),\n", " scoring_network=scoring_network,\n", " optimizer=tf.compat.v1.train.AdamOptimizer(learning_rate=learning_rate),\n", " feedback_model=agent_feedback_model,\n", " policy_type=policy_type,\n", " logits_temperature=logits_temperature,\n", " penalty_mixture_coefficient=penalty_mixture,\n", " summarize_grads_and_vars=True)\n", "\n" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:31.609044Z", "iopub.status.busy": "2023-12-22T12:12:31.608685Z", "iopub.status.idle": "2023-12-22T12:12:31.611945Z", "shell.execute_reply": "2023-12-22T12:12:31.611393Z" }, "id": "ZMImW7rrWn5w" }, "outputs": [], "source": [ "#@title Choosing the desired agent.\n", "agent_type = \"cosine_distance_agent\" #@param[\"cosine_distance_agent\", \"no_penalty_agent\", \"descending_scores_agent\"]\n", "if agent_type == \"descending_scores_agent\":\n", " agent = descending_scores_agent\n", "elif agent_type == \"no_penalty_agent\":\n", " agent = no_penalty_agent\n", "else:\n", " agent = cosine_distance_agent" ] }, { "cell_type": "markdown", "metadata": { "id": "SYQ2sCaz6tTX" }, "source": [ "Before we can start our training loop, there is one more thing we need to take care of, concerning the training data.\n", "\n", "The arm features presented to the policy at decision time contains all items that the policy can choose from. However, at training, we need the features of items that were selected, and for convenience, in the order of the decision output. To this end, the following function is used (copied here for clarity from [here](https://github.com/tensorflow/agents/tree/master/tf_agents/bandits/agents/examples/v2/train_eval_ranking.py)." ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:31.615234Z", "iopub.status.busy": "2023-12-22T12:12:31.614998Z", "iopub.status.idle": "2023-12-22T12:12:31.621254Z", "shell.execute_reply": "2023-12-22T12:12:31.620675Z" }, "id": "vpUfQXgD7y0t" }, "outputs": [], "source": [ "def order_items_from_action_fn(orig_trajectory):\n", " \"\"\"Puts the features of the selected items in the recommendation order.\n", "\n", " This function is used to make sure that at training the item observation is\n", " filled with features of items selected by the policy, in the order of the\n", " selection. Features of unselected items are discarded.\n", "\n", " Args:\n", " orig_trajectory: The trajectory as output by the policy\n", "\n", " Returns:\n", " The modified trajectory that contains slotted item features.\n", " \"\"\"\n", " item_obs = orig_trajectory.observation[\n", " bandit_spec_utils.PER_ARM_FEATURE_KEY]\n", " action = orig_trajectory.action\n", " if isinstance(\n", " orig_trajectory.observation[bandit_spec_utils.PER_ARM_FEATURE_KEY],\n", " tensor_spec.TensorSpec):\n", " dtype = orig_trajectory.observation[\n", " bandit_spec_utils.PER_ARM_FEATURE_KEY].dtype\n", " shape = [\n", " num_slots, orig_trajectory.observation[\n", " bandit_spec_utils.PER_ARM_FEATURE_KEY].shape[-1]\n", " ]\n", " new_observation = {\n", " bandit_spec_utils.GLOBAL_FEATURE_KEY:\n", " orig_trajectory.observation[bandit_spec_utils.GLOBAL_FEATURE_KEY],\n", " bandit_spec_utils.PER_ARM_FEATURE_KEY:\n", " tensor_spec.TensorSpec(dtype=dtype, shape=shape)\n", " }\n", " else:\n", " slotted_items = tf.gather(item_obs, action, batch_dims=1)\n", " new_observation = {\n", " bandit_spec_utils.GLOBAL_FEATURE_KEY:\n", " orig_trajectory.observation[bandit_spec_utils.GLOBAL_FEATURE_KEY],\n", " bandit_spec_utils.PER_ARM_FEATURE_KEY:\n", " slotted_items\n", " }\n", " return trajectory.Trajectory(\n", " step_type=orig_trajectory.step_type,\n", " observation=new_observation,\n", " action=(),\n", " policy_info=(),\n", " next_step_type=orig_trajectory.next_step_type,\n", " reward=orig_trajectory.reward,\n", " discount=orig_trajectory.discount)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:31.624254Z", "iopub.status.busy": "2023-12-22T12:12:31.623994Z", "iopub.status.idle": "2023-12-22T12:12:31.626936Z", "shell.execute_reply": "2023-12-22T12:12:31.626377Z" }, "id": "VQDWXgDUsCZ1" }, "outputs": [], "source": [ "#@title Defininfing Parameters to Run the Agent on the Defined Environment\n", "num_iterations = 400 #@param{ type: \"number\" }\n", "steps_per_loop = 2 #@param{ type: \"integer\" }" ] }, { "cell_type": "markdown", "metadata": { "id": "Na2ZHarNVS0-" }, "source": [ "As in the bandit tutorials, we define the replay buffer that will feed the agent the samples to train on. Then, we use the driver to put everything together: The environment provides features, the policy chooses rankings, and samples are collected to be trained on." ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:12:31.629854Z", "iopub.status.busy": "2023-12-22T12:12:31.629637Z", "iopub.status.idle": "2023-12-22T12:14:54.188607Z", "shell.execute_reply": "2023-12-22T12:14:54.187839Z" }, "id": "qt6ifI5AYWfu" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "WARNING:tensorflow:From /tmpfs/tmp/ipykernel_9144/2279345075.py:31: ReplayBuffer.gather_all (from tf_agents.replay_buffers.replay_buffer) is deprecated and will be removed in a future version.\n", "Instructions for updating:\n", "Use `as_dataset(..., single_deterministic_pass=True)` instead.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:tensorflow:From /tmpfs/tmp/ipykernel_9144/2279345075.py:31: ReplayBuffer.gather_all (from tf_agents.replay_buffers.replay_buffer) is deprecated and will be removed in a future version.\n", "Instructions for updating:\n", "Use `as_dataset(..., single_deterministic_pass=True)` instead.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING:root:\n", "Distribution subclass PenalizedPlackettLuce inherits `_parameter_properties from its parent (PlackettLuce)\n", "while also redefining `__init__`. The inherited annotations cover the following\n", "parameters: dict_keys(['scores']). It is likely that these do not match the subclass parameters.\n", "This may lead to errors when computing batch shapes, slicing into batch\n", "dimensions, calling `.copy()`, flattening the distribution as a CompositeTensor\n", "(e.g., when it is passed or returned from a `tf.function`), and possibly other\n", "cases. The recommended pattern for distribution subclasses is to define a new\n", "`_parameter_properties` method with the subclass parameters, and to store the\n", "corresponding parameter values as `self._parameters` in `__init__`, after\n", "calling the superclass constructor:\n", "\n", "```\n", "class MySubclass(tfd.SomeDistribution):\n", "\n", " def __init__(self, param_a, param_b):\n", " parameters = dict(locals())\n", " # ... do subclass initialization ...\n", " super(MySubclass, self).__init__(**base_class_params)\n", " # Ensure that the subclass (not base class) parameters are stored.\n", " self._parameters = parameters\n", "\n", " def _parameter_properties(self, dtype, num_classes=None):\n", " return dict(\n", " # Annotations may optionally specify properties, such as `event_ndims`,\n", " # `default_constraining_bijector_fn`, `specifies_shape`, etc.; see\n", " # the `ParameterProperties` documentation for details.\n", " param_a=tfp.util.ParameterProperties(),\n", " param_b=tfp.util.ParameterProperties())\n", "```\n", "\n" ] } ], "source": [ "replay_buffer = bandit_replay_buffer.BanditReplayBuffer(\n", " data_spec=order_items_from_action_fn(agent.policy.trajectory_spec),\n", " batch_size=batch_size,\n", " max_length=steps_per_loop)\n", "\n", "if feedback_model == ranking_environment.FeedbackModel.SCORE_VECTOR:\n", " reward_metric = tf_metrics.AverageReturnMetric(\n", " batch_size=environment.batch_size,\n", " buffer_size=200)\n", "else:\n", " reward_metric = tf_metrics.AverageReturnMultiMetric(\n", " reward_spec=environment.reward_spec(),\n", " batch_size=environment.batch_size,\n", " buffer_size=200)\n", "\n", "add_batch_fn = lambda data: replay_buffer.add_batch(\n", " order_items_from_action_fn(data))\n", "\n", "observers = [add_batch_fn, reward_metric]\n", "\n", "driver = dynamic_step_driver.DynamicStepDriver(\n", " env=environment,\n", " policy=agent.collect_policy,\n", " num_steps=steps_per_loop * batch_size,\n", " observers=observers)\n", "\n", "reward_values = []\n", "\n", "for _ in range(num_iterations):\n", " driver.run()\n", " loss_info = agent.train(replay_buffer.gather_all())\n", " replay_buffer.clear()\n", " if feedback_model == ranking_environment.FeedbackModel.SCORE_VECTOR:\n", " reward_values.append(reward_metric.result())\n", " else:\n", " reward_values.append(reward_metric.result())\n" ] }, { "cell_type": "markdown", "metadata": { "id": "Gwy7cQP3JrU0" }, "source": [ "Let's plot the reward!" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "execution": { "iopub.execute_input": "2023-12-22T12:14:54.192569Z", "iopub.status.busy": "2023-12-22T12:14:54.192306Z", "iopub.status.idle": "2023-12-22T12:14:54.453557Z", "shell.execute_reply": "2023-12-22T12:14:54.452858Z" }, "id": "eZPOXzfyy5Sh" }, "outputs": [ { "data": { "text/plain": [ "Text(0.5, 0, 'Number of Iterations')" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkgAAAGwCAYAAABSN5pGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAD+MUlEQVR4nOx9ebwcRbX/t3vmbtluEiAr0bAvQggkElF2I/BQcUMR8aHoDxEFlIgiT1kENAEVeSJPniDvuaDggspDjUJIWDSsYTdsYgjZyXqz3Xtnpvv3R091n6o+VV090zNzb9LfzyefzJ3prq7eqk59z/ec4/i+7yNHjhw5cuTIkSNHCLfVHciRI0eOHDly5BhoyA2kHDly5MiRI0cOBbmBlCNHjhw5cuTIoSA3kHLkyJEjR44cORTkBlKOHDly5MiRI4eC3EDKkSNHjhw5cuRQkBtIOXLkyJEjR44cCoqt7sBghed5WLFiBYYPHw7HcVrdnRw5cuTIkSOHBXzfx+bNmzFhwgS4rp4nyg2kGrFixQpMmjSp1d3IkSNHjhw5ctSA119/Hbvvvrv299xAqhHDhw8HEFzgESNGtLg3OXLkyJEjRw4b9PT0YNKkSeE8rkNuINUI4VYbMWJEbiDlyJEjR44cgwxJ8phcpJ0jR44cOXLkyKEgN5By5MiRI0eOHDkU5AZSjhw5cuTIkSOHgtxAypEjR44cOX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1u3bm12uQICAvDpp5/i3nvvRd++ffHss8/i5ZdfxpQpU5r/4RAZlEUoBxYQERERuTm2IBEREREpMEEiIiIiUmCCRERERKTABImIiIhIgQkSERERkQITJCIiIiIFJkhERERECkyQiIiIiBSYIBEREREpMEEiIiIiUmCCRERERKTw/5Ujz1T+/JGTAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "if feedback_model == ranking_environment.FeedbackModel.SCORE_VECTOR:\n", " reward = reward_values\n", "else:\n", " reward = [r[\"chosen_value\"] for r in reward_values]\n", "plt.plot(reward)\n", "plt.ylabel('Average Return')\n", "plt.xlabel('Number of Iterations')" ] }, { "cell_type": "markdown", "metadata": { "id": "gvbm_qCGJy0D" }, "source": [ "# What's Next?\n", "\n", "This tutorial has lots of tunable parameters, including the policy/agent to use, some properties of the environment, and even the feedback model. Feel free to experiment with those parameters!\n", "\n", "There is also a ready-to-run example for ranking in `tf_agents/bandits/agents/examples/v2/train_eval_ranking.py`" ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "ranking_tutorial.ipynb", "private_outputs": true, "provenance": [], "toc_visible": true }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.18" } }, "nbformat": 4, "nbformat_minor": 0 }