code: def _test_quantize_mlp(weights, activations, frozen, device):
      model = MLP(32, 10, 128).to(device)
      output = get_outputs(model, 1, 32, device)
      quantize(model, weights=weights, activations=activations)
      if frozen:
          freeze(model)
      check_mlp(model, frozen)
      with Calibration():
          qoutput = get_outputs(model, 1, 32, device)
      if activations is not None:
          assert isinstance(qoutput, QTensor)
      # Don't expect more than a 0.99 similarity
      assert_similar(output, qoutput, atol=1e-2)
  
file_path: quanto/test/model/test_quantize_mlp.py
imports: import pytest
  import torch
  from helpers import assert_similar, random_qtensor
  from quanto import Calibration, QLinear, QTensor, freeze, quantize
label_desc: Use image node_id 3 for calling a global function with example usage: _test_quantize_mlp(weights, activations, frozen, device) without return types