effects.py 文件源码

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

项目:py-noisemaker 作者: aayars 项目源码 文件源码
def inner_tile(tensor, shape, freq):
    """
    """

    if isinstance(freq, int):
        freq = freq_for_shape(freq, shape)

    small_shape = [int(shape[0] / freq[0]), int(shape[1] / freq[1]), shape[2]]

    y_index = tf.tile(column_index(small_shape) * freq[0], [freq[0], freq[0]])
    x_index = tf.tile(row_index(small_shape) * freq[1], [freq[0], freq[0]])

    tiled = tf.gather_nd(tensor, tf.stack([y_index, x_index], 2))

    tiled = resample(tiled, shape, spline_order=1)

    return tiled
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号