widgets.py 文件源码

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

项目:photinia 作者: XoriieInpottn 项目源码 文件源码
def _setup(self, x, axes=None):
        """Setup the linear layer.

        :param x: Input tensor.
        :param axes: Axes. If x is a tensor, the layer will perform tensor dot.
        :return: Output tensor.
        """
        y = tf.matmul(x, self._w) if axes is None else tf.tensordot(x, self._w, axes=axes)
        if self._with_bias:
            y += self._b
        if self._with_batch_norm:
            y = self._batch_norm.setup(y)
        return y
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号