code: def test_train_param_init(init_rbm, affinity_matrix):
      # obtain the train/test set matrices
      Xtr, _ = affinity_matrix
  
      # initialize the model
      model = RBM(
          possible_ratings=np.setdiff1d(np.unique(Xtr), np.array([0])),
          visible_units=Xtr.shape[1],
          hidden_units=init_rbm["n_hidden"],
          training_epoch=init_rbm["epochs"],
          minibatch_size=init_rbm["minibatch"],
      )
      # fit the model to the data
      model.fit(Xtr)
  
      # visible units placeholder (tensor)
      model.vu.shape[1] == Xtr.shape[1]
      # weight matrix
      assert model.w.shape == [Xtr.shape[1], init_rbm["n_hidden"]]
      # bias, visible units
      assert model.bv.shape == [1, Xtr.shape[1]]
      # bias, hidden units
      assert model.bh.shape == [1, init_rbm["n_hidden"]]
  
imports: import pytest
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_train_param_init(init_rbm, affinity_matrix) without return types