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


Python util.get_generator_conditioning方法代码示例

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


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

示例1: _get_generated_data

# 需要导入模块: import util [as 别名]
# 或者: from util import get_generator_conditioning [as 别名]
def _get_generated_data(num_images_generated, conditional_eval, num_classes):
  """Get generated images."""
  noise = tf.random_normal([num_images_generated, 64])
  # If conditional, generate class-specific images.
  if conditional_eval:
    conditioning = util.get_generator_conditioning(
        num_images_generated, num_classes)
    generator_inputs = (noise, conditioning)
    generator_fn = networks.conditional_generator
  else:
    generator_inputs = noise
    generator_fn = networks.generator
  # In order for variables to load, use the same variable scope as in the
  # train job.
  with tf.variable_scope('Generator'):
    data = generator_fn(generator_inputs)

  return data 
开发者ID:rky0930,项目名称:yolo_v2,代码行数:20,代码来源:eval.py

示例2: _get_generated_data

# 需要导入模块: import util [as 别名]
# 或者: from util import get_generator_conditioning [as 别名]
def _get_generated_data(num_images_generated, conditional_eval, num_classes):
  """Get generated images."""
  noise = tf.random_normal([num_images_generated, 64])
  # If conditional, generate class-specific images.
  if conditional_eval:
    conditioning = util.get_generator_conditioning(
        num_images_generated, num_classes)
    generator_inputs = (noise, conditioning)
    generator_fn = networks.conditional_generator
  else:
    generator_inputs = noise
    generator_fn = networks.generator
  # In order for variables to load, use the same variable scope as in the
  # train job.
  with tf.variable_scope('Generator'):
    data = generator_fn(generator_inputs, is_training=False)

  return data 
开发者ID:itsamitgoel,项目名称:Gun-Detector,代码行数:20,代码来源:eval.py

示例3: test_get_generator_conditioning

# 需要导入模块: import util [as 别名]
# 或者: from util import get_generator_conditioning [as 别名]
def test_get_generator_conditioning(self):
    conditioning = util.get_generator_conditioning(12, 4)
    self.assertEqual([12, 4], conditioning.shape.as_list()) 
开发者ID:rky0930,项目名称:yolo_v2,代码行数:5,代码来源:util_test.py


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