parameters: (
          self,
          name,
          input_name,
          output_name,
          begin_ids,
          end_ids,
          strides,
          begin_masks,
          end_masks,
          squeeze_masks=None,
      )
return_statement: return spec_layer
docstring: Add a slice_static layer to the model that extracts a slice of size
          ``(end - begin) / stride`` from the given input tensor.
          Refer to the **SliceStaticLayerParams** message in specification (NeuralNetwork.proto) for more details.
  
          Parameters
          ----------
          name: str
              The name of this layer.
          input_name: str
              The input blob name of this layer.
          output_name: str
              The output blob name of this layer.
          begin_ids: list of int or tuple of int
              Begin offsets for slice layer.
          end_ids: list of int or tuple of int
              End offsets for slice layer.
          strides: list of int or tuple of int
              Strides for slice layer.
          begin_masks: list of bool
              Boolean masks for begin offsets.
          end_masks: list of bool
              Boolean masks for end offsets.
          squeeze_masks: list of bool
              Boolean masks for squeezing axis.
  
          See Also
          --------
          add_slice_dynamic
docstring_summary: Add a slice_static layer to the model that extracts a slice of size
          ``(end - begin) / stride`` from the given input tensor.
          Refer to the **SliceStaticLayerParams** message in specification (NeuralNetwork.proto) for more details.
docstring_tokens: Add a slice_static layer to the model that extracts a slice of size ( end - begin ) / stride from the given input tensor . Refer to the ** SliceStaticLayerParams ** message in specification ( NeuralNetwork . proto ) for more details .
function: def add_slice_static(
          self,
          name,
          input_name,
          output_name,
          begin_ids,
          end_ids,
          strides,
          begin_masks,
          end_masks,
          squeeze_masks=None,
      ):
          """
          Add a slice_static layer to the model that extracts a slice of size
          ``(end - begin) / stride`` from the given input tensor.
          Refer to the **SliceStaticLayerParams** message in specification (NeuralNetwork.proto) for more details.
  
          Parameters
          ----------
          name: str
              The name of this layer.
          input_name: str
              The input blob name of this layer.
          output_name: str
              The output blob name of this layer.
          begin_ids: list of int or tuple of int
              Begin offsets for slice layer.
          end_ids: list of int or tuple of int
              End offsets for slice layer.
          strides: list of int or tuple of int
              Strides for slice layer.
          begin_masks: list of bool
              Boolean masks for begin offsets.
          end_masks: list of bool
              Boolean masks for end offsets.
          squeeze_masks: list of bool
              Boolean masks for squeezing axis.
  
          See Also
          --------
          add_slice_dynamic
          """
  
          rank = len(begin_ids)
          assert len(end_ids) == rank
          assert len(strides) == rank
          assert len(begin_masks) == rank
          assert len(end_masks) == rank
          assert squeeze_masks is None or len(squeeze_masks) == rank
  
          spec_layer = self._add_generic_layer(name, [input_name], [output_name])
          spec_layer_params = spec_layer.sliceStatic
  
          spec_layer_params.beginIds.extend(begin_ids)
          spec_layer_params.endIds.extend(end_ids)
          spec_layer_params.strides.extend(strides)
          spec_layer_params.beginMasks.extend(begin_masks)
          spec_layer_params.endMasks.extend(end_masks)
  
          if not (squeeze_masks and any(squeeze_masks)):
              return spec_layer
  
          if self.spec and (
              not self.spec.specificationVersion
              or self.spec.specificationVersion < _SPECIFICATION_VERSION_IOS_14
          ):
              self.spec.specificationVersion = _SPECIFICATION_VERSION_IOS_14
          spec_layer_params.squeezeMasks.extend(squeeze_masks)
  
          return spec_layer
function_tokens: def add_slice_static ( self , name , input_name , output_name , begin_ids , end_ids , strides , begin_masks , end_masks , squeeze_masks = None , ) : rank = len ( begin_ids ) assert len ( end_ids ) == rank assert len ( strides ) == rank assert len ( begin_masks ) == rank assert len ( end_masks ) == rank assert squeeze_masks is None or len ( squeeze_masks ) == rank spec_layer = self . _add_generic_layer ( name , [ input_name ] , [ output_name ] ) spec_layer_params = spec_layer . sliceStatic spec_layer_params . beginIds . extend ( begin_ids ) spec_layer_params . endIds . extend ( end_ids ) spec_layer_params . strides . extend ( strides ) spec_layer_params . beginMasks . extend ( begin_masks ) spec_layer_params . endMasks . extend ( end_masks ) if not ( squeeze_masks and any ( squeeze_masks ) ) : return spec_layer if self . spec and ( not self . spec . specificationVersion or self . spec . specificationVersion < _SPECIFICATION_VERSION_IOS_14 ) : self . spec . specificationVersion = _SPECIFICATION_VERSION_IOS_14 spec_layer_params . squeezeMasks . extend ( squeeze_masks ) return spec_layer