code: def convert_upsample(builder, layer, input_names, output_names, keras_layer):
      
      # Get input and output names
      input_name, output_name = (input_names[0], output_names[0])
  
      if isinstance(keras_layer, keras.layers.convolutional.UpSampling1D):
          fh, fw = 1, keras_layer.length
      else: # 2D
          fh, fw = keras_layer.size
  
      builder.add_upsample(name = layer,
               scaling_factor_h = fh,
               scaling_factor_w = fw,
               input_name = input_name,
               output_name = output_name)
docs: Convert convolution layer from keras to coreml.
  
      Parameters
      ----------
      keras_layer: layer
          A keras layer object.
  
      builder: NeuralNetworkBuilder
          A neural network builder object.