d8ab8131e19498c2b9bed8d218e4e46eedc7cf21,librosa/tf_agc.py,,tf_agc,#,106

Before Change


            if f2a is None: 
                // initialize the mel filter bank after grabbing the first frame
                f2a = melfb(sample_rate, len(frame), num_frequency_bands, mel_filter_width)
                f2a = f2a[:,:(round(len(frame)/2) + 1)]

                n   = f2a.shape[0]
                

After Change



        // Iterate over frames
        for frame in frame_iterator:
            frame = numpy.frombuffer(frame, "h")

            if f2a is None: 
                // initialize the mel filter bank after grabbing the first frame

                f2a = melfb(sample_rate, len(frame), num_frequency_bands, mel_filter_width)
//                 f2a = f2a[:,:(round(len(frame)/2) + 1)]
                

                //% map back to FFT grid, flatten bark loop gain
                //sf2a = sum(f2a);

                normalize_f2a                       = numpy.sum(f2a, axis=0)
                normalize_f2a[normalize_f2a == 0]   = 1.0
                normalize_f2a                       = 1.0 / normalize_f2a

                // initialze the state vector
                state   = numpy.zeros( (num_frequency_bands, 1) )[0]

                pass

            // FFT each frame
            D = scipy.fft(frame)

            // multiply by f2a
            audiogram = numpy.dot(f2a, numpy.abs(D))

            //// DPWE
            //             state = max([alpha*state,audgram(:,i)],[],2);
            //             fbg(:,i) = state;
            // ...
            //
            state = numpy.maximum(alpha * state, audiogram)

            //E = diag(1./(sf2a+(sf2a==0))) * f2a" * fbg;
            E   = normalize_f2a * numpy.dot(f2a.T, state);
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: librosa/librosa
Commit Name: d8ab8131e19498c2b9bed8d218e4e46eedc7cf21
Time: 2012-10-20
Author: brm2132@columbia.edu
File Name: librosa/tf_agc.py
Class Name:
Method Name: tf_agc


Project Name: luispedro/mahotas
Commit Name: 8212d47a90e0f90ba0d264d062880ee866b4808f
Time: 2015-06-26
Author: luis@luispedro.org
File Name: mahotas/bbox.py
Class Name:
Method Name: bbox


Project Name: tensorflow/models
Commit Name: baacb20d15066935e4a23c09b1c1a6843331172f
Time: 2020-10-02
Author: gardener@tensorflow.org
File Name: research/object_detection/meta_architectures/center_net_meta_arch.py
Class Name:
Method Name: prediction_tensors_to_boxes