docstr: keras_modeling.inceptionv3 can load weights (even different #channels).
  
  Args:
    checkpoint_weights_shape: The shape of the weights (checkpoint) file.
    input_shape: The shape of the model we're training now.
docstr_tok: ["keras_modeling.inceptionv3","can","load","weights","(","even","different","#","channels",")",".","Args",":","checkpoint_weights_shape",":","The","shape","of","the","weights","(","checkpoint",")","file",".","input_shape",":","The","shape","of","the","model","we","'re","training","now","."]
code: def test_inceptionv3_with_init_weights(
      self, checkpoint_weights_shape, input_shape
  ):
      """keras_modeling.inceptionv3 can load weights (even different #channels).
  
      Args:
        checkpoint_weights_shape: The shape of the weights (checkpoint) file.
        input_shape: The shape of the model we're training now.
      """
      # Create a model and save it to a checkpoint. Then test whether we can
      # detect its number of channels correctly.
      weights_ckpt_path = _filepath_for_weights_ckpt_from_shape(
          checkpoint_weights_shape
      )
  
      model = keras_modeling.inceptionv3(
          input_shape=input_shape,
          weights=weights_ckpt_path,
          init_backbone_with_imagenet=False,
      )
      x = np.random.uniform(size=(1,) + input_shape)
      y = model.predict(
          tf.keras.applications.inception_v3.preprocess_input(x)
      )
      expected_shape = (1, dv_constants.NUM_CLASSES)
      self.assertEqual(y.shape, expected_shape)
      self.assertTrue(np.all(y >= 0))
      self.assertTrue(np.all(y <= 1))
      self.assertAlmostEqual(np.sum(y), 1.0, delta=1e-4)
  
imports: from typing import Tuple
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from deepvariant import dv_config
  from deepvariant import dv_constants
  from deepvariant import keras_modeling
  from third_party.nucleus.testing import test_utils
label_desc: Use image node_id 5 for calling the KerasModelingTest obj's underlying member method code with example usage: obj.test_inceptionv3_with_init_weights(checkpoint_weights_shape, input_shape) without return types