code: def test_nnclassifier_with_param_maps(self):
      model = Sequential().add(Linear(2, 2))
      criterion = MSECriterion()
      data = self.sc.parallelize(
          [
              ((2.0, 1.0), 1.0),
              ((1.0, 2.0), 2.0),
              ((2.0, 1.0), 1.0),
              ((1.0, 2.0), 2.0),
          ]
      )
  
      val_data = self.sc.parallelize(
          [((2.0, 1.0), 1.0), ((1.0, 2.0), 2.0)]
      )
  
      schema = StructType(
          [
              StructField(
                  "features", ArrayType(DoubleType(), False), False
              ),
              StructField("label", DoubleType(), False),
          ]
      )
      df = self.sqlContext.createDataFrame(data, schema)
      val_df = self.sqlContext.createDataFrame(val_data, schema)
  
      print(model.get_weights())
  
      classfier = (
          NNClassifier(model, criterion, SeqToTensor([2]))
          .setBatchSize(4)
          .setMaxEpoch(5)
          .setValidation(EveryEpoch(), val_df, [Top1Accuracy()], 2)
      )
  
      param = (
          ParamGridBuilder()
          .addGrid(classfier.learningRate, [1e-3, 1.0])
          .build()
      )
  
      models = classfier.fit(df, params=param)
      assert len(models) == 2
  
      w1 = models[0].model.get_weights()
      w2 = models[1].model.get_weights()
  
      for ww1, ww2 in zip(w1, w2):
          diff = np.sum((ww1 - ww2) ** 2)
          assert diff > 1e-2
  
imports: import errno
  import shutil
  import pytest
  from bigdl.dllib.nn.criterion import *
  from bigdl.dllib.nn.layer import *
  from bigdl.dllib.optim.optimizer import *
  from numpy.testing import assert_allclose
  from pyspark.ml import Pipeline, PipelineModel
  from pyspark.ml.feature import MinMaxScaler
  from pyspark.ml.tuning import ParamGridBuilder
  from pyspark.sql.types import *
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.common import *
  from bigdl.dllib.feature.image import *
  from bigdl.dllib.keras import layers
  from bigdl.dllib.keras.models import Model
  from bigdl.dllib.keras.optimizers import Adam
  from bigdl.dllib.nnframes import *
  from bigdl.dllib.utils.tf import *
  from pyspark.sql.functions import array
  from pyspark.ml.linalg import DenseVector, VectorUDT
  from pyspark.sql.functions import udf, array
label_desc: Use image node_id 32 for calling the TestNNClassifer obj's underlying member method code with example usage: obj.test_nnclassifier_with_param_maps() without return types