code: def test_minkowski(self):
      from torch_points3d.applications.minkowski import Minkowski
  
      input_nc = 3
      num_layers = 4
      in_feat = 16
      model = Minkowski(
          architecture="encoder",
          input_nc=input_nc,
          in_feat=in_feat,
          num_layers=num_layers,
          config=None,
      )
      dataset = MockDatasetGeometric(
          input_nc,
          transform=GridSampling3D(0.01, quantize_coords=True),
          num_points=128,
      )
      self.assertEqual(
          len(model._modules["down_modules"]), num_layers + 1
      )
      self.assertEqual(len(model._modules["inner_modules"]), 1)
      self.assertFalse(model.has_mlp_head)
      self.assertEqual(model.output_nc, 8 * in_feat)
  
      try:
          data_out = model.forward(dataset[0])
          # self.assertEqual(data_out.x.shape[1], 8 * in_feat)
      except Exception as e:
          print("Model failing:")
          print(model)
          raise e
  
      input_nc = 3
      num_layers = 4
      grid_sampling = 0.02
      in_feat = 32
      output_nc = 5
      model = Minkowski(
          architecture="encoder",
          input_nc=input_nc,
          output_nc=output_nc,
          in_feat=in_feat,
          in_grid_size=grid_sampling,
          num_layers=num_layers,
          config=None,
      )
      dataset = MockDatasetGeometric(
          input_nc,
          transform=GridSampling3D(0.01, quantize_coords=True),
          num_points=128,
      )
      self.assertEqual(
          len(model._modules["down_modules"]), num_layers + 1
      )
      self.assertEqual(len(model._modules["inner_modules"]), 1)
      self.assertTrue(model.has_mlp_head)
      self.assertEqual(model.output_nc, output_nc)
  
      try:
          data_out = model.forward(dataset[0])
          self.assertEqual(data_out.x.shape[1], output_nc)
      except Exception as e:
          print("Model failing:")
          print(model)
          raise e
  
imports: from torch_points3d.datasets.object_detection.scannet import ScannetDataset
  from torch_points3d.core.data_transform import GridSampling3D
  from torch_points3d.applications.pretrained_api import PretainedRegistry
  from test.mockdatasets import MockDatasetGeometric, MockDataset
  import os
  import sys
  import unittest
  import torch
  from omegaconf import OmegaConf
label_desc: Use image node_id 4 for calling the TestAPIEncoder obj's underlying member method code with example usage: obj.test_minkowski() without return types