tensorport.py 文件源码

python
阅读 61 收藏 0 点赞 0 评论 0

项目:jack 作者: uclmr 项目源码 文件源码
def create_placeholder(self):
        """Creates a TF placeholder_with_default.

        Convenience method that produces a constant of the type, value and shape defined by the port.
        Returns: a constant tensor of same type, shape and name. It can nevertheless be fed with external values
        as if it was a placeholder.
        """
        ph = tf.placeholder_with_default(self.default_value, self.shape, self.name)
        if ph.dtype != self.dtype:
            logger.warning(
                "Placeholder {} with default of type {} created for TensorPort with type {}!".format(self.name,
                                                                                                     ph.dtype,
                                                                                                     self.dtype))
        return ph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号