当前位置: 首页>>代码示例>>Python>>正文


Python inputs.SERVING_FED_EXAMPLE_KEY属性代码示例

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


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

示例1: test_predict_input_with_additional_channels

# 需要导入模块: from object_detection import inputs [as 别名]
# 或者: from object_detection.inputs import SERVING_FED_EXAMPLE_KEY [as 别名]
def test_predict_input_with_additional_channels(self):
    """Tests the predict input function with additional channels."""
    configs = _get_configs_for_model('ssd_inception_v2_pets')
    configs['eval_input_configs'][0].num_additional_channels = 2
    predict_input_fn = inputs.create_predict_input_fn(
        model_config=configs['model'],
        predict_input_config=configs['eval_input_configs'][0])
    serving_input_receiver = predict_input_fn()

    image = serving_input_receiver.features[fields.InputDataFields.image]
    receiver_tensors = serving_input_receiver.receiver_tensors[
        inputs.SERVING_FED_EXAMPLE_KEY]
    # RGB + 2 additional channels = 5 channels.
    self.assertEqual([1, 300, 300, 5], image.shape.as_list())
    self.assertEqual(tf.float32, image.dtype)
    self.assertEqual(tf.string, receiver_tensors.dtype) 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:18,代码来源:inputs_test.py

示例2: test_predict_input_with_additional_channels

# 需要导入模块: from object_detection import inputs [as 别名]
# 或者: from object_detection.inputs import SERVING_FED_EXAMPLE_KEY [as 别名]
def test_predict_input_with_additional_channels(self):
    """Tests the predict input function with additional channels."""
    configs = _get_configs_for_model('ssd_inception_v2_pets')
    configs['eval_input_config'].num_additional_channels = 2
    predict_input_fn = inputs.create_predict_input_fn(
        model_config=configs['model'],
        predict_input_config=configs['eval_input_config'])
    serving_input_receiver = predict_input_fn()

    image = serving_input_receiver.features[fields.InputDataFields.image]
    receiver_tensors = serving_input_receiver.receiver_tensors[
        inputs.SERVING_FED_EXAMPLE_KEY]
    # RGB + 2 additional channels = 5 channels.
    self.assertEqual([1, 300, 300, 5], image.shape.as_list())
    self.assertEqual(tf.float32, image.dtype)
    self.assertEqual(tf.string, receiver_tensors.dtype) 
开发者ID:BMW-InnovationLab,项目名称:BMW-TensorFlow-Training-GUI,代码行数:18,代码来源:inputs_test.py

示例3: test_predict_input

# 需要导入模块: from object_detection import inputs [as 别名]
# 或者: from object_detection.inputs import SERVING_FED_EXAMPLE_KEY [as 别名]
def test_predict_input(self):
    """Tests the predict input function."""
    configs = _get_configs_for_model('ssd_inception_v2_pets')
    predict_input_fn = inputs.create_predict_input_fn(
        model_config=configs['model'],
        predict_input_config=configs['eval_input_configs'][0])
    serving_input_receiver = predict_input_fn()

    image = serving_input_receiver.features[fields.InputDataFields.image]
    receiver_tensors = serving_input_receiver.receiver_tensors[
        inputs.SERVING_FED_EXAMPLE_KEY]
    self.assertEqual([1, 300, 300, 3], image.shape.as_list())
    self.assertEqual(tf.float32, image.dtype)
    self.assertEqual(tf.string, receiver_tensors.dtype) 
开发者ID:ahmetozlu,项目名称:vehicle_counting_tensorflow,代码行数:16,代码来源:inputs_test.py

示例4: test_predict_input

# 需要导入模块: from object_detection import inputs [as 别名]
# 或者: from object_detection.inputs import SERVING_FED_EXAMPLE_KEY [as 别名]
def test_predict_input(self):
    """Tests the predict input function."""
    configs = _get_configs_for_model('ssd_inception_v2_pets')
    predict_input_fn = inputs.create_predict_input_fn(
        model_config=configs['model'])
    serving_input_receiver = predict_input_fn()

    image = serving_input_receiver.features[fields.InputDataFields.image]
    receiver_tensors = serving_input_receiver.receiver_tensors[
        inputs.SERVING_FED_EXAMPLE_KEY]
    self.assertEqual([1, 300, 300, 3], image.shape.as_list())
    self.assertEqual(tf.float32, image.dtype)
    self.assertEqual(tf.string, receiver_tensors.dtype) 
开发者ID:cagbal,项目名称:ros_people_object_detection_tensorflow,代码行数:15,代码来源:inputs_test.py

示例5: test_predict_input

# 需要导入模块: from object_detection import inputs [as 别名]
# 或者: from object_detection.inputs import SERVING_FED_EXAMPLE_KEY [as 别名]
def test_predict_input(self):
    """Tests the predict input function."""
    configs = _get_configs_for_model('ssd_inception_v2_pets')
    predict_input_fn = inputs.create_predict_input_fn(
        model_config=configs['model'],
        predict_input_config=configs['eval_input_config'])
    serving_input_receiver = predict_input_fn()

    image = serving_input_receiver.features[fields.InputDataFields.image]
    receiver_tensors = serving_input_receiver.receiver_tensors[
        inputs.SERVING_FED_EXAMPLE_KEY]
    self.assertEqual([1, 300, 300, 3], image.shape.as_list())
    self.assertEqual(tf.float32, image.dtype)
    self.assertEqual(tf.string, receiver_tensors.dtype) 
开发者ID:BMW-InnovationLab,项目名称:BMW-TensorFlow-Training-GUI,代码行数:16,代码来源:inputs_test.py

示例6: test_predict_input

# 需要导入模块: from object_detection import inputs [as 别名]
# 或者: from object_detection.inputs import SERVING_FED_EXAMPLE_KEY [as 别名]
def test_predict_input(self):
        """Tests the predict input function."""
        configs = _get_configs_for_model('ssd_inception_v2_pets')
        predict_input_fn = inputs.create_predict_input_fn(
            model_config=configs['model'])
        serving_input_receiver = predict_input_fn()

        image = serving_input_receiver.features[fields.InputDataFields.image]
        receiver_tensors = serving_input_receiver.receiver_tensors[
            inputs.SERVING_FED_EXAMPLE_KEY]
        self.assertEqual([1, 300, 300, 3], image.shape.as_list())
        self.assertEqual(tf.float32, image.dtype)
        self.assertEqual(tf.string, receiver_tensors.dtype) 
开发者ID:scorelab,项目名称:Elphas,代码行数:15,代码来源:inputs_test.py


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