yscacaca / DeepSense

Deepsense: a unified deep learning framework for time-series mobile sensing data processing.
196 stars 71 forks source link

Hi can you explain about this kernal size in the following line . #6

Closed shamanez closed 7 years ago

shamanez commented 7 years ago

https://github.com/shamanez/DeepSense/blob/master/deepSense_HHAR_tf.py#L97

yscacaca commented 7 years ago

The size of acc_inputs is (BATCH_SIZE, WIDE, INTER_DIM/2, 1), where INTER_DIM/2 = SEPCTURAL_SAMPLES32 (3 means x,y,z axises of the sensor input, and 2 means the real and imaginary parts of the FFT result). Then every 6 values on acc_inputs[2] correspond to a single element. Therefore, we use kernel_size = [1, 23CONV_LEN] and stride = [1, 2*3] for the first convolutional layer.

Btw, you can also reshape acc_inputs into (BATCH_SIZE, WIDE, SEPCTURAL_SAMPLES, 6). Then you can have the first convolutional layers with kernel_size = [1, CONV_LEN] and stride = [1,1].

shamanez commented 7 years ago

Thanks . Can we represent FFT results as Phase and angle unlike complex numbers ?

yscacaca commented 7 years ago

Yes, it should be okay.

shamanez commented 7 years ago

Another thing. Here we use same convolutional Neural Nets in each time steps. How we train the parameters of convolutional neural nets ? Is that each time step we take the derivatives and joinly update them ?

yscacaca commented 7 years ago

Yes, it just does the similar thing as rnn, calculating the gradient with backpropagation through time.

shamanez commented 7 years ago

perfect. :)