graph.py 文件源码

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

项目:relaax 作者: deeplearninc 项目源码 文件源码
def build_graph(self, dtype, shape=None, name=None):
        """Assemble one placeholder.

        Args:
            shape: The shape of the tensor to be fed (optional). If the shape is not
      specified, you can feed a tensor of any shape.
            dtype: The type of elements in the placeholder to be fed.
            name: A name for the placeholder (optional).

        Returns:
            placeholder of given shape and data type
        """

        ph = tf.placeholder(self.DTYPE[dtype], shape=shape, name=name)
        if dtype not in [np.int32, np.int64]:
            self.checked = tf.check_numerics(ph, '')
        return ph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号