本文整理汇总了Python中tensorpack.InputDesc方法的典型用法代码示例。如果您正苦于以下问题:Python tensorpack.InputDesc方法的具体用法?Python tensorpack.InputDesc怎么用?Python tensorpack.InputDesc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tensorpack
的用法示例。
在下文中一共展示了tensorpack.InputDesc方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_inputs
# 需要导入模块: import tensorpack [as 别名]
# 或者: from tensorpack import InputDesc [as 别名]
def _get_inputs(self):
return [InputDesc(self.image_dtype, [None, self.image_shape, self.image_shape, 3], 'input'),
InputDesc(tf.int32, [None], 'label')]
示例2: _get_inputs
# 需要导入模块: import tensorpack [as 别名]
# 或者: from tensorpack import InputDesc [as 别名]
def _get_inputs(self):
return [InputDesc(tf.float32, (BATCH_SIZE, IMAGE_WIDTH, IMAGE_HEIGHT, 3), 'input_a'),
InputDesc(tf.float32, (BATCH_SIZE,), 'score_a'),
InputDesc(tf.float32, (BATCH_SIZE, IMAGE_WIDTH, IMAGE_HEIGHT, 3), 'input_p'),
InputDesc(tf.float32, (BATCH_SIZE,), 'score_p'),
InputDesc(tf.float32, (BATCH_SIZE, IMAGE_WIDTH, IMAGE_HEIGHT, 3), 'input_n'),
InputDesc(tf.float32, (BATCH_SIZE,), 'score_n')]
示例3: inputs
# 需要导入模块: import tensorpack [as 别名]
# 或者: from tensorpack import InputDesc [as 别名]
def inputs(self):
# Use a combined state for efficiency.
# The first h channels are the current state, and the last h channels are the next state.
return [InputDesc(tf.uint8,
(None,) + self.image_shape + (self.channel + 1,),
'comb_state'),
InputDesc(tf.int64, (None,), 'action'),
InputDesc(tf.float32, (None,), 'reward'),
InputDesc(tf.bool, (None,), 'isOver')]
示例4: _get_inputs
# 需要导入模块: import tensorpack [as 别名]
# 或者: from tensorpack import InputDesc [as 别名]
def _get_inputs(self):
# Use a combined state for efficiency.
# The first h channels are the current state, and the last h channels are the next state.
return [InputDesc(tf.uint8,
(None,) + (self.agents,)+self.image_shape + (self.channel + 1,),
'comb_state'),
InputDesc(tf.int64, (None,self.agents), 'action'),
InputDesc(tf.float32, (None,self.agents), 'reward'),
InputDesc(tf.bool, (None,self.agents), 'isOver'),
]