code: def init_conv2d(self, layer):
      if (
          len(layer.weights["weight"].data.shape) == 2
      ):  # This can happen if we assign weights of Dense layer to 1x1 Conv2D
          layer.weights["weight"].data = np.expand_dims(
              layer.weights["weight"].data, axis=(0, 1)
          )
  
      if layer.model.config.is_resource_strategy(layer):
          layer.set_attr("strategy", "resource")
          self.set_target_reuse_factor(layer)
          n_in, n_out = self.get_layer_mult_size(layer)
          self.set_closest_reuse_factor(layer, n_in, n_out)
      else:
          layer.set_attr("strategy", "latency")
  
      out_height = layer.get_output_variable().shape[0]
      out_width = layer.get_output_variable().shape[1]
      chosen_pf = layer.model.config.get_layer_config_value(
          layer, "ParallelizationFactor", 1
      )
      valid_pf = self.get_valid_conv_partition_splits(
          out_height, out_width
      )
      if chosen_pf not in valid_pf:
          closest_pf = self.get_closest_reuse_factor(
              valid_pf, chosen_pf
          )
          valid_pf_str = ",".join(map(str, valid_pf))
          print(
              f'WARNING: Invalid ParallelizationFactor={chosen_pf} in layer "{layer.name}".'
              f"Using ParallelizationFactor={closest_pf} instead. Valid ParallelizationFactor(s): {valid_pf_str}."
          )
      else:
          closest_pf = chosen_pf
      layer.set_attr(
          "n_partitions", out_height * out_width // closest_pf
      )
  
      layer.set_attr(
          "implementation",
          layer.model.config.get_conv_implementation(layer).lower(),
      )
  
      self._validate_conv_strategy(layer)
  
imports: import os
  import sys
  import numpy
  from hls4ml.backends import FPGABackend
  from hls4ml.backends.fpga.fpga_types import APTypeConverter, HLSTypeConverter, VivadoArrayVariableConverter
  from hls4ml.model.attributes import ChoiceAttribute, ConfigurableAttribute, TypeAttribute
  from hls4ml.model.flow import register_flow
  from hls4ml.model.layers import GRU, LSTM, Conv1D, Conv2D, Dense, DepthwiseConv2D, Embedding, GarNet, GarNetStack, GlobalPooling1D, GlobalPooling2D, Layer, Pooling1D, Pooling2D, SeparableConv1D, SeparableConv2D, SimpleRNN, Softmax
  from hls4ml.model.optimizer import get_backend_passes, layer_optimizer
  from hls4ml.model.types import FixedPrecisionType, IntegerPrecisionType, NamedType, PackedType
  from hls4ml.report import parse_vivado_report
  from hls4ml.utils.fixed_point_utils import ceil_log2
label_desc: Use image node_id 13 for calling the VivadoBackend obj's underlying member method code with example usage: obj.init_conv2d(layer) without return types