code: def test_simplified_inverse_gdn_clamp(shape):
      gen = torch.Generator()
      gen.manual_seed(123)
      x = torch.randn(shape)
  
      # floating precision error requires this test to be double
      layer = SimplifiedInverseGDN(x.shape[1]).to(torch.double)
      params = layer.parameters()
      layer.gamma.data = layer.gamma.data - 5
      layer.beta.data = layer.beta.data - 5
  
      _ = layer(x.to(torch.double))
  
      # make sure we clamped the params
      assert torch.allclose(
          layer.gamma.data, torch.zeros_like(layer.gamma.data)
      )
      assert torch.allclose(
          layer.beta.data,
          torch.ones_like(layer.beta.data) * layer.beta_min,
      )
  
      # make sure we didn't delete parameters
      assert len(list(params)) == 2
  
imports: import pytest
  import torch
  from neuralcompression.layers import SimplifiedGDN, SimplifiedInverseGDN
label_desc: Use image node_id 4 for calling a global function with example usage: test_simplified_inverse_gdn_clamp(shape) without return types