run.py 文件源码

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

项目:source_separation_ml_jeju 作者: hjkwon0609 项目源码 文件源码
def transform_spec_from_raw(raw):
    '''
    Read raw features from TFRecords and shape them into spectrograms
    '''
    spec = tf.decode_raw(raw, tf.float32)
    spec.set_shape([Config.num_time_frames * Config.num_freq_bins * 2])
    spec = tf.reshape(spec, [-1, Config.num_freq_bins * 2])
    real, imag = tf.split(spec, [Config.num_freq_bins, Config.num_freq_bins], axis=1)
    orig_spec = tf.complex(real, imag)
    return orig_spec  # [num_time_frames, num_freq_bin]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号