32d73ccb0d80db3727775fb9928f5f151ddaaab5,nt/speech_enhancement/mask_estimation.py,,simple_ideal_soft_mask,#,44

Before Change


    power = np.einsum("...dk,...dk->...k", X.conjugate(), X)
    mask = (power / np.sum(power, axis=power.ndim-1, keepdims=True)).real

    return mask


def quantile_mask(observations, quantile_fraction=0.98, quantile_weight=0.999):
     Calculate softened mask according to lorenz function criterion.

After Change


    if not tuple_output:
        return np.squeeze(mask, axis=feature_dim)
    else:
        sizes = np.cumsum([o.shape[source_dim] for o in input])
        output = np.split(mask, sizes[:-1], axis=source_dim)

        for i in range(len(output)):
            if output[i].shape[source_dim] is 1:
                output[i] = np.squeeze(output[i])
                // ToDo: Determine, why the commented code is not working
                // output[i] = np.squeeze(output[i], axis=(source_dim,feature_dim))
            else:
                output[i] = np.squeeze(output[i], axis=feature_dim)

        return output


def quantile_mask(observations, quantile_fraction=0.98, quantile_weight=0.999):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: fgnt/pb_bss
Commit Name: 32d73ccb0d80db3727775fb9928f5f151ddaaab5
Time: 2015-10-06
Author: cbj@mail.uni-paderborn.de
File Name: nt/speech_enhancement/mask_estimation.py
Class Name:
Method Name: simple_ideal_soft_mask


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 3c857b194b02141ea0fb79a178c4229433430354
Time: 2017-05-08
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATushare.py
Class Name:
Method Name: QA_fetch_get_stock_info


Project Name: fgnt/pb_bss
Commit Name: 32d73ccb0d80db3727775fb9928f5f151ddaaab5
Time: 2015-10-06
Author: cbj@mail.uni-paderborn.de
File Name: nt/speech_enhancement/mask_estimation.py
Class Name:
Method Name: simple_ideal_soft_mask


Project Name: onnx/onnx-tensorflow
Commit Name: 58ace0a10f2859a7bfbb9b56238ba47e4175f5ac
Time: 2020-10-09
Author: wtsang@us.ibm.com
File Name: onnx_tf/handlers/backend/max.py
Class Name: Max
Method Name: _common