class_docstr: The Batch-Concatenating distribution.
  
  This distribution concatenates a list of distributions
  along a given axis of their batch shapes.
  
  In order to be concatenable along `axis`,
  `dist1`  and `dist2` should meet the following requirements:
  1. `dist1.event_shape == dist2.event_shape`
  2. `len(dist1.batch_shape) == len(dist2.batch_shape)`
  3. `\forall i \neq axis, dist1.batch_shape[i] == 1 or
                           dist1.batch_shape[i] == dist2.batch_shape[i]`
  If `dist1.batch_shape[i] == 1`, the distribution will be
  broadcasted along this axis.
  
  TODO(b/179916710): The distribution does NOT support sample broadcasting.
  Given a sample `x` and a BatchConcat distribution `dist`, `dist.log_prob(x)`
  requires that `x.shape == sample_shape + dist.batch_shape + dist.event_shape`.
  
  #### Example
  
  ```python
  tfd = tfp.distributions
  
  dtype = np.float32
  dims = 2
  batch_shape_1 = [32, 2]
  batch_shape_2 = [32, 6]
  
  scale_1 = np.ones(batch_shape_1 + [dims], dtype)
  mvn_1 = tfd.MultivariateNormalDiag(scale_diag=scale_1)
  scale_2 = np.ones(batch_shape_2 + [dims], dtype)
  mvn_2 = tfd.MultivariateNormalDiag(scale_diag=scale_2)
  batched_mvn = tfd.BatchConcat(
      distributions=[mvn_1, mvn_2],
      axis=1,
      validate_args=True)
  
  batched_mvn.batch_shape
  # ==> [32, 8]
  
  x = batched_mvn.sample(sample_shape=[4, 5])
  x.shape
  # ==> [4, 5, 32, 8, 2] == sample_shape + batched_mvn.batch_shape + [dims]
  
  reshape_mvn.log_prob(x).shape
  # ==> [4, 5, 32, 8] == sample_shape + batched_mvn.batch_shape
  ```
  
  #### Example for broadcasting.
  The distributions need to have the same batch shape size
  to enable broadcasting.
  
  ```python
  tfd = tfp.distributions
  
  dtype = np.float32
  dims = 2
  batch_shape_1 = [1, 2, 16]
  batch_shape_2 = [32, 6, 1]
  
  scale_1 = np.ones(batch_shape_1 + [dims], dtype)
  mvn_1 = tfd.MultivariateNormalDiag(scale_diag=scale_1)
  scale_2 = np.ones(batch_shape_2 + [dims], dtype)
  mvn_2 = tfd.MultivariateNormalDiag(scale_diag=scale_2)
  batched_mvn = tfd.BatchConcat(
      distributions=[mvn_1, mvn_2],
      axis=1,
      validate_args=True)
  
  batched_mvn.batch_shape
  # ==> [32, 8, 16]
  
  x = batched_mvn.sample(sample_shape=[4, 5])
  x.shape
  # ==> [4, 5, 32, 8, 16, 2] == sample_shape + batched_mvn.batch_shape + [dims]
  
  reshape_mvn.log_prob(x).shape
  # ==> [4, 5, 32, 8, 16] == sample_shape + batched_mvn.batch_shape
  ```
class_docstr_tok: ["The","Batch-Concatenating","distribution",".","This","distribution","concatenates","a","list","of","distributions","along","a","given","axis","of","their","batch","shapes",".","In","order","to","be","concatenable","along","`","axis","`",",","`","dist1","`","and","`","dist2","`","should","meet","the","following","requirements",":","1",".","`","dist1.event_shape","==","dist2.event_shape","`","2",".","`","len","(","dist1.batch_shape",")","==","len","(","dist2.batch_shape",")","`","3",".","`","\\forall","i","\\neq","axis",",","dist1.batch_shape","[","i","]","==","1","or","dist1.batch_shape","[","i","]","==","dist2.batch_shape","[","i","]","`","If","`","dist1.batch_shape","[","i","]","==","1","`",",","the","distribution","will","be","broadcasted","along","this","axis",".","TODO","(","b\/179916710",")",":","The","distribution","does","NOT","support","sample","broadcasting",".","Given","a","sample","`","x","`","and","a","BatchConcat","distribution","`","dist","`",",","`","dist.log_prob","(","x",")","`","requires","that","`","x.shape","==","sample_shape","+","dist.batch_shape","+","dist.event_shape","`",".","#","#","#","#","Example","``","`","python","tfd","=","tfp.distributions","dtype","=","np.float32","dims","=","2","batch_shape_1","=","[","32",",","2","]","batch_shape_2","=","[","32",",","6","]","scale_1","=","np.ones","(","batch_shape_1","+","[","dims","]",",","dtype",")","mvn_1","=","tfd.MultivariateNormalDiag","(","scale_diag=scale_1",")","scale_2","=","np.ones","(","batch_shape_2","+","[","dims","]",",","dtype",")","mvn_2","=","tfd.MultivariateNormalDiag","(","scale_diag=scale_2",")","batched_mvn","=","tfd.BatchConcat","(","distributions=","[","mvn_1",",","mvn_2","]",",","axis=1",",","validate_args=True",")","batched_mvn.batch_shape","#","==",">","[","32",",","8","]","x","=","batched_mvn.sample","(","sample_shape=","[","4",",","5","]",")","x.shape","#","==",">","[","4",",","5",",","32",",","8",",","2","]","==","sample_shape","+","batched_mvn.batch_shape","+","[","dims","]","reshape_mvn.log_prob","(","x",")",".shape","#","==",">","[","4",",","5",",","32",",","8","]","==","sample_shape","+","batched_mvn.batch_shape","``","`","#","#","#","#","Example","for","broadcasting",".","The","distributions","need","to","have","the","same","batch","shape","size","to","enable","broadcasting",".","``","`","python","tfd","=","tfp.distributions","dtype","=","np.float32","dims","=","2","batch_shape_1","=","[","1",",","2",",","16","]","batch_shape_2","=","[","32",",","6",",","1","]","scale_1","=","np.ones","(","batch_shape_1","+","[","dims","]",",","dtype",")","mvn_1","=","tfd.MultivariateNormalDiag","(","scale_diag=scale_1",")","scale_2","=","np.ones","(","batch_shape_2","+","[","dims","]",",","dtype",")","mvn_2","=","tfd.MultivariateNormalDiag","(","scale_diag=scale_2",")","batched_mvn","=","tfd.BatchConcat","(","distributions=","[","mvn_1",",","mvn_2","]",",","axis=1",",","validate_args=True",")","batched_mvn.batch_shape","#","==",">","[","32",",","8",",","16","]","x","=","batched_mvn.sample","(","sample_shape=","[","4",",","5","]",")","x.shape","#","==",">","[","4",",","5",",","32",",","8",",","16",",","2","]","==","sample_shape","+","batched_mvn.batch_shape","+","[","dims","]","reshape_mvn.log_prob","(","x",")",".shape","#","==",">","[","4",",","5",",","32",",","8",",","16","]","==","sample_shape","+","batched_mvn.batch_shape","``","`"]
code: def _batch_shape_tensor(self):
      return self._calculate_batch_shape()
  
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 10 for calling the _BatchConcat obj's underlying member method code with example usage: obj._batch_shape_tensor() and returns: self