DigitalMediaProfessionals / tool

DV network conversion tool
Apache License 2.0
0 stars 1 forks source link

Extra feature support of 1D data #16

Closed nhatuan84 closed 5 years ago

nhatuan84 commented 5 years ago

Currently, Convertor tool only support for 2D data. But in voice applications, data is 1D. So the convertor need to support 1D input data (such as Conv1d and MaxPool1d and GlobalAveragePooling1D, ...)

ZongHong-Lyu commented 5 years ago

In Keras Conv1D, there is a special padding called 'causal' padding. I am not really sure what this padding is doing so can anyone explain what is that for and how to implement it?

ZongHong-Lyu commented 5 years ago

From the source code of Keras:

if padding == 'causal':
    # causal (dilated) convolution:
    left_pad = dilation_rate * (kernel_shape[0] - 1)
    x = temporal_padding(x, (left_pad, 0))
    padding = 'valid'

so causal needs to add dilation_rate * (kernel_size - 1) left padding.

ZongHong-Lyu commented 5 years ago

Hi Tuan,

I pushed the conv1d branch, which should support 1D layers for Keras. Currently it is waiting for the review but you can try to use that branch for your projects first.

nhatuan84 commented 5 years ago

Hi Lyu, Thanks. i will test it soon.