Skip to content

Commit

Permalink
Removes deprecated property tfd.OneHotCategorical.event_size.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 286196220
  • Loading branch information
jburnim authored and tensorflower-gardener committed Dec 18, 2019
1 parent 7a0ce5e commit f0cced6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tensorflow_probability/python/distributions/onehot_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from tensorflow_probability.python.internal import reparameterization
from tensorflow_probability.python.internal import tensor_util
from tensorflow_probability.python.internal import tensorshape_util
from tensorflow.python.util import deprecation # pylint: disable=g-direct-tensorflow-import


class OneHotCategorical(distribution.Distribution):
Expand Down Expand Up @@ -135,16 +134,6 @@ def __init__(self,
def _params_event_ndims(cls):
return dict(logits=1, probs=1)

@property
@deprecation.deprecated(
'2019-10-01', 'The `event_size` property is deprecated. Use '
'`tf.shape(self.probs if self.logits is None else self.logits)[-1]` '
'instead.')
def event_size(self):
"""Scalar `int32` tensor: the number of classes."""
with self._name_and_control_scope('event_size'):
return self._event_size()

def _event_size(self, param=None):
if param is None:
param = self._logits if self._logits is not None else self._probs
Expand Down

0 comments on commit f0cced6

Please sign in to comment.