class_docstr: Related to minibatch training
class_docstr_tok: ["Related","to","minibatch","training"]
code: def test_multidim_scaling(self):
      with pm.Model() as model0:
          pm.Normal("n", observed=[[1, 1], [1, 1]], total_size=[])
          p0 = pytensor.function([], model0.logp())
  
      with pm.Model() as model1:
          pm.Normal("n", observed=[[1, 1], [1, 1]], total_size=[2, 2])
          p1 = pytensor.function([], model1.logp())
  
      with pm.Model() as model2:
          pm.Normal("n", observed=[[1], [1]], total_size=[2, 2])
          p2 = pytensor.function([], model2.logp())
  
      with pm.Model() as model3:
          pm.Normal("n", observed=[[1, 1]], total_size=[2, 2])
          p3 = pytensor.function([], model3.logp())
  
      with pm.Model() as model4:
          pm.Normal("n", observed=[[1]], total_size=[2, 2])
          p4 = pytensor.function([], model4.logp())
  
      with pm.Model() as model5:
          pm.Normal("n", observed=[[1]], total_size=[2, Ellipsis, 2])
          p5 = pytensor.function([], model5.logp())
      _p0 = p0()
      assert (
          np.allclose(_p0, p1())
          and np.allclose(_p0, p2())
          and np.allclose(_p0, p3())
          and np.allclose(_p0, p4())
          and np.allclose(_p0, p5())
      )
  
file_path: pymc/tests/variational/test_minibatch_rv.py
imports: import numpy
  import pytensor
  import pytest
  from scipy import stats
  import pymc
  from pymc import Normal, draw
  from pymc.data import minibatch_index
  from pymc.testing import select_by_precision
  from pymc.variational.minibatch_rv import create_minibatch_rv
  from tests.test_data import gen1, gen2
label_desc: Use image node_id 4 for calling the TestMinibatchRandomVariable obj's underlying member method code with example usage: obj.test_multidim_scaling() without return types