基于python实现resnet_Python resnet_v1.resnet_v1_50方法代码示例

本文详细介绍了Python中nets.resnet_v1.resnet_v1_50方法的使用,包括多个初始化示例,适用于Faster R-CNN和SSD模型。文章提供不同参数配置,帮助开发者理解和应用该方法。
摘要由CSDN通过智能技术生成

本文整理汇总了Python中nets.resnet_v1.resnet_v1_50方法的典型用法代码示例。如果您正苦于以下问题:Python resnet_v1.resnet_v1_50方法的具体用法?Python resnet_v1.resnet_v1_50怎么用?Python resnet_v1.resnet_v1_50使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在模块nets.resnet_v1的用法示例。

在下文中一共展示了resnet_v1.resnet_v1_50方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

​点赞 6

# 需要导入模块: from nets import resnet_v1 [as 别名]

# 或者: from nets.resnet_v1 import resnet_v1_50 [as 别名]

def __init__(self,

is_training,

first_stage_features_stride,

reuse_weights=None,

weight_decay=0.0):

"""Constructor.

Args:

is_training: See base class.

first_stage_features_stride: See base class.

reuse_weights: See base class.

weight_decay: See base class.

Raises:

ValueError: If `first_stage_features_stride` is not 8 or 16,

or if `architecture` is not supported.

"""

super(FasterRCNNResnet50FeatureExtractor, self).__init__(

'resnet_v1_50', resnet_v1.resnet_v1_50, is_training,

first_stage_features_stride, reuse_weights, weight_decay)

开发者ID:ringringyi,项目名称:DOTA_models,代码行数:22,

示例2: __init__

​点赞 6

# 需要导入模块: from nets import resnet_v1 [as 别名]

# 或者: from nets.resnet_v1 import resnet_v1_50 [as 别名]

def __init__(self,

is_training,

first_stage_features_stride,

batch_norm_trainable=False,

reuse_weights=None,

weight_decay=0.0):

"""Constructor.

Args:

is_training: See base class.

first_stage_features_stride: See base class.

batch_norm_trainable: See base class.

reuse_weights: See base class.

weight_decay: See base class.

Raises:

ValueError: If `first_stage_features_stride` is not 8 or 16,

or if `architecture` is not supported.

"""

super(FasterRCNNResnet50FeatureExtractor, self).__init__(

'resnet_v1_50', resnet_v1.resnet_v1_50, is_training,

first_stage_features_stride, batch_norm_trainable,

reuse_weights, weight_decay)

开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:25,

示例3: __init__

​点赞 6

# 需要导入模块: from nets import resnet_v1 [as 别名]

# 或者: from nets.resnet_v1 import resnet_v1_50 [as 别名]

def __init__(self,

is_training,

first_stage_features_stride,

batch_norm_trainable=False,

reuse_weights=None,

weight_decay=0.0,

activation_fn=tf.nn.relu):

"""Constructor.

Args:

is_training: See base class.

first_stage_features_stride: See base class.

batch_norm_trainable: See base class.

reuse_weights: See base class.

weight_decay: See base class.

activation_fn: See base class.

Raises:

ValueError: If `first_stage_features_stride` is not 8 or 16,

or if `architecture` is not supported.

"""

super(FasterRCNNResnet50FeatureExtractor,

self).__init__('resnet_v1_50', resnet_v1.resnet_v1_50, is_training,

first_stage_features_stride, batch_norm_trainable,

reuse_weights, weight_decay, activation_fn)

开发者ID:ShivangShekhar,项目名称:Live-feed-object-device-identification-using-Tensorflow-and-OpenCV,代码行数:27,

示例4: __init__

​点赞 6

# 需要导入模块: from nets import resnet_v1 [as 别名]

# 或者: from nets.resnet_v1 import resnet_v1_50 [as 别名]

def __init__(self,

is_training,

first_stage_features_stride,

reuse_weights=None,

weight_decay=0.0,

base_features='block3',

freeze_layer='',

batch_norm_trainable=False,

):

"""Constructor.

Args:

is_training: See base class.

first_stage_features_stride: See base class.

reuse_weights: See base class.

weight_decay: See base class.

Raises:

ValueError: If `first_stage_features_stride` is not 8 or 16,

or if `architecture` is not supported.

"""

super(FasterRCNNResnet50FeatureExtractor, self).__init__(

'resnet_v1_50', resnet_v1.resnet_v1_50, is_training,

first_stage_features_stride, reuse_weights, weight_decay,

base_features, freeze_layer, batch_norm_trainable)

示例5: __init__

​点赞 5

# 需要导入模块: from nets import resnet_v1 [as 别名]

# 或者: from nets.resnet_v1 import resnet_v1_50 [as 别名]

def __init__(self,

is_training,

depth_multiplier,

min_depth,

pad_to_multiple,

conv_hyperparams_fn,

reuse_weights=None,

use_explicit_padding=False,

use_depthwise=False,

override_base_feature_extractor_hyperparams=False):

"""Resnet50 v1 Feature Extractor for SSD Models.

Args:

is_training: whether the network is in training mode.

depth_multiplier: float depth multiplier for feature extractor.

min_depth: minimum feature extractor depth.

pad_to_multiple: the nearest multiple to zero pad the input height and

width dimensions to.

conv_hyperparams_fn: A function to construct tf slim arg_scope for conv2d

and separable_conv2d ops in the layers that are added on top of the

base feature extractor.

reuse_weights: Whether to reuse variables. Default is None.

use_explicit_padding: Whether to use explicit padding when extracting

features. Default is False.

use_depthwise: Whether to use depthwise convolutions. Default is False.

override_base_feature_extractor_hyperparams: Whether to override

hyperparameters of the base feature extractor with the one from

`conv_hyperparams_fn`.

"""

super(SSDResnet50V1PpnFeatureExtractor, self).__init__(

is_training, depth_multiplier, min_depth, pad_to_multiple,

conv_hyperparams_fn, resnet_v1.resnet_v1_50, 'resnet_v1_50',

reuse_weights, use_explicit_padding, use_depthwise,

override_base_feature_extractor_hyperparams=(

override_base_feature_extractor_hyperparams))

开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:37,

示例6: __init__

​点赞 5

# 需要导入模块: from nets import resnet_v1 [as 别名]

# 或者: from nets.resnet_v1 import resnet_v1_50 [as 别名]

def __init__(self,

is_training,

depth_multiplier,

min_depth,

pad_to_multiple,

conv_hyperparams,

batch_norm_trainable=True,

reuse_weights=None,

use_explicit_padding=False,

use_depthwise=False):

"""Resnet50 v1 FPN Feature Extractor for SSD Models.

Args:

is_training: whether the network is in training mode.

depth_multiplier: float depth multiplier for feature extractor.

min_depth: minimum feature extractor depth.

pad_to_multiple: the nearest multiple to zero pad the input height and

width dimensions to.

conv_hyperparams: tf slim arg_scope for conv2d and separable_conv2d ops.

batch_norm_trainable: Whether to update batch norm parameters during

training or not. When training with a small batch size

(e.g. 1), it is desirable to disable batch norm update and use

pretrained batch norm params.

reuse_weights: Whether to reuse variables. Default is None.

use_explicit_padding: Whether to use explicit padding when extracting

features. Default is False. UNUSED currently.

use_depthwise: Whether to use depthwise convolutions. UNUSED currently.

"""

super(SSDResnet50V1FpnFeatureExtractor, self).__init__(

is_training, depth_multiplier, min_depth, pad_to_multiple,

conv_hyperparams, resnet_v1.resnet_v1_50, 'resnet_v1_50', 'fpn',

batch_norm_trainable, reuse_weights, use_explicit_padding)

开发者ID:cagbal,项目名称:ros_people_object_detection_tensorflow,代码行数:34,

注:本文中的nets.resnet_v1.resnet_v1_50方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值