yscacaca / DeepSense

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

How to do the Convolution Operation for inputs in each time step ? #8

Closed shamanez closed 7 years ago

shamanez commented 7 years ago

In this line you do the convolution2D operation with acceleration inputs(acc_inputs) . The size has mentioned as follows ,

(BATCH_SIZE, WIDE, FEATURE_DIM, CHANNEL=1)

So I have this problem . Batch_Size is for number of examples in a mini batch . But here you have to do the convolution operation for acceleration input of each time step . In the acc_inputs do we have each time step inputs . And can we do the convolution in parallel way ?

yscacaca commented 7 years ago

Here WIDE represents the wide of timescale. I'm not sure what your meaning of "convolution in parallel way". If you mean whether the computations can be paralleled, the answer will be yes.

shamanez commented 7 years ago

Yes that what I was asking . So in a Session when I feed the dict it should be distributed in the sequential way (Inputs in each time steps). So basically if the batch size is 1 , Each input and each time step should go through the CNN then feed it to the LSTM and we jointly train . Am I right ?

yscacaca commented 7 years ago

That's true. The inputs for each step go through CNNs, which can be done parallelly. Then the outputs are fed sequentially to the RNNs along time.

benielT commented 7 years ago

Oh nice. So with this implementation CNN weights also distributed in time axis as in RNN . So when optimizing we update each layers weight of CNN with BPTT. As I understood this property is obtained by feeding the inputs in a correct shape. So finally it would be really nice if you can explain bit more about dimensions of each batch . It would be really nice .

shamanez commented 7 years ago

yeah cab you explain on this . As the final thing ?

yscacaca commented 7 years ago

Take acc_inputs as an example. The size of this input is (BATCH_SIZE, WIDE, FEATURE_DIM, CHANNEL=1).

BATCH_SIZE: the batch size of the input. WIDE: the wide of time scale or the number of time steps. FEATURE_DIM and CHANNEL: you can follow the explanation here

shamanez commented 7 years ago

Nice.