本文整理匯總了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'),
]