當前位置: 首頁>>代碼示例>>Python>>正文


Python sonnet.Conv3D方法代碼示例

本文整理匯總了Python中sonnet.Conv3D方法的典型用法代碼示例。如果您正苦於以下問題:Python sonnet.Conv3D方法的具體用法?Python sonnet.Conv3D怎麽用?Python sonnet.Conv3D使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sonnet的用法示例。


在下文中一共展示了sonnet.Conv3D方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _build

# 需要導入模塊: import sonnet [as 別名]
# 或者: from sonnet import Conv3D [as 別名]
def _build(self, inputs, is_training):
    """Connects the module to inputs.

    Args:
      inputs: Inputs to the Unit3D component.
      is_training: whether to use training mode for snt.BatchNorm (boolean).

    Returns:
      Outputs from the module.
    """
    net = snt.Conv3D(output_channels=self._output_channels,
                     kernel_shape=self._kernel_shape,
                     stride=self._stride,
                     padding=snt.SAME,
                     use_bias=self._use_bias)(inputs)
    if self._use_batch_norm:
      bn = snt.BatchNorm()
      net = bn(net, is_training=is_training, test_local_stats=False)
    if self._activation_fn is not None:
      net = self._activation_fn(net)
    return net 
開發者ID:LossNAN,項目名稱:I3D-Tensorflow,代碼行數:23,代碼來源:i3d.py

示例2: _build

# 需要導入模塊: import sonnet [as 別名]
# 或者: from sonnet import Conv3D [as 別名]
def _build(self, inputs, is_training):
    """Connects the module to inputs.

    Args:
      inputs: Inputs to the Unit3D component.
      is_training: whether to use training mode for snt.BatchNorm (boolean).

    Returns:
      Outputs from the module.
    """
    net = snt.Conv3D(output_channels=self._output_channels,
                     kernel_shape=self._kernel_shape,
                     stride=self._stride,
                     padding=snt.SAME,
                     use_bias=self._use_bias)(inputs)
    if self._use_batch_norm:
      bn = snt.BatchNorm()
      #################### Warning batchnorm is hard coded to is_training=False #################
      # net = bn(net, is_training=is_training, test_local_stats=False)
      net = bn(net, is_training=False, test_local_stats=False)
    if self._activation_fn is not None:
      net = self._activation_fn(net)
    return net 
開發者ID:oulutan,項目名稱:ACAM_Demo,代碼行數:25,代碼來源:i3d.py

示例3: _build

# 需要導入模塊: import sonnet [as 別名]
# 或者: from sonnet import Conv3D [as 別名]
def _build(self, inputs, is_training):
        """Connects the module to inputs.

    Args:
    inputs: Inputs to the Unit3Dtf component.
    is_training: whether to use training mode for snt.BatchNorm (boolean).

    Returns:
    Outputs from the module.
        """
        net = snt.Conv3D(
            output_channels=self._output_channels,
            kernel_shape=self._kernel_shape,
            stride=self._stride,
            padding=snt.SAME,
            use_bias=self._use_bias)(inputs)
        if self._use_batch_norm:
            bn = snt.BatchNorm()
            net = bn(net, is_training=is_training, test_local_stats=False)
        if self._activation_fn is not None:
            net = self._activation_fn(net)

        return net 
開發者ID:hassony2,項目名稱:kinetics_i3d_pytorch,代碼行數:25,代碼來源:i3dtf.py


注:本文中的sonnet.Conv3D方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。