code: def test_ngram_conv_net_synthetic_reward(self):
      state_dim = 10
      action_dim = 2
      sizes = [256, 128]
      activations = ["sigmoid", "relu"]
      last_layer_activation = "leaky_relu"
      context_size = 3
  
      conv_net_params = rlp.ConvNetParameters(
          conv_dims=[256, 128],
          conv_height_kernels=[1, 1],
          pool_types=["max", "max"],
          pool_kernel_sizes=[1, 1],
      )
      net = NGramConvolutionalNetwork(
          state_dim=state_dim,
          action_dim=action_dim,
          sizes=sizes,
          activations=activations,
          last_layer_activation=last_layer_activation,
          context_size=context_size,
          conv_net_params=conv_net_params,
      )
  
      reward_net = SyntheticRewardNet(net)
      conv_net = reward_net.export_mlp().conv_net
  
      assert conv_net.conv_dims == [1, 256, 128]
      assert conv_net.conv_height_kernels == [1, 1]
      assert conv_net.conv_width_kernels == [12, 1]
  
      assert conv_net.conv_layers[0].in_channels == 1
      assert conv_net.conv_layers[0].out_channels == 256
      assert conv_net.conv_layers[0].kernel_size == (1, 12)
      assert conv_net.conv_layers[0].stride == (1, 1)
      assert conv_net.conv_layers[1].in_channels == 256
      assert conv_net.conv_layers[1].out_channels == 128
      assert conv_net.conv_layers[1].kernel_size == (1, 1)
      assert conv_net.conv_layers[1].stride == (1, 1)
  
      dnn = reward_net.export_mlp().conv_net.feed_forward.dnn
      assert dnn[0][0].in_features == 384
      assert dnn[0][0].out_features == 256
      assert dnn[0][1]._get_name() == "Sigmoid"
      assert dnn[1][0].in_features == 256
      assert dnn[1][0].out_features == 128
      assert dnn[1][1]._get_name() == "ReLU"
      assert dnn[2][0].in_features == 128
      assert dnn[2][0].out_features == 1
      assert dnn[2][1]._get_name() == "LeakyReLU"
  
file_path: ReAgent/reagent/test/models/test_synthetic_reward_net.py
imports: import logging
  import unittest
  import torch
  from reagent.core import parameters
  from reagent.models.synthetic_reward import _gen_mask, NGramConvolutionalNetwork, NGramFullyConnectedNetwork, SequenceSyntheticRewardNet, SingleStepSyntheticRewardNet, SyntheticRewardNet, TransformerSyntheticRewardNet
  from reagent.models.synthetic_reward_sparse_arch import SingleStepSyntheticSparseArchRewardNet, SyntheticRewardSparseArchNet
  from torchrec import EmbeddingBagCollection, EmbeddingBagConfig
label_desc: Use image node_id 3 for calling the TestSyntheticReward obj's underlying member method code with example usage: obj.test_ngram_conv_net_synthetic_reward() without return types