layers.py 文件源码

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

项目:fold 作者: tensorflow 项目源码 文件源码
def _process_batch(self, batch):
    # We have to call tf.abs before calling tf.mod, because tf.mod gives
    # native outputs when given negative inputs.
    if self._cast: batch = tf.cast(batch, tf.int32)
    if self._mod_inputs: batch = tf.mod(tf.abs(batch), self._num_buckets)
    return tf.gather(self._weights, batch)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号