Questions about FCN
tengerye opened this issue · 5 comments
May I ask two questions of your FCN code please?
-
Traditional sequential data is of three dimensions: (batch_size, sequence_length, sequence_dimension). Why the data is four dimension in your code?
-
In your paper, you stated that "the features are fed into a global average pooling layer instead of a fully connected layer." But you implemented the fully connected layer
out = keras.layers.Dense(nb_classes, activation='softmax')(full)
. Why is that?
Thank you in advance.
-
As the code is using conv2d, so just pad 1 more dimension with 1d kernel. It is the same with (batch_size, sequence_length, sequence_dimension) with conv1d.
-
This is a softmax layer to output the label, not a fc layer.
Hi, just one more question. In the global average pooling, the number of padding will affect the forward result, e.g. for the sequence [1, 2, 3], if the length of the longest sequence is 9, then the average is 0.67, but if the length is 6, then the average is 0.5.
Do you think it is fine?
Hi,about the code "x_train_mean = x_train.mean() x_train_std = x_train.std() " , I have tested that the output is a scalar; It shouldn't be a vector with the same length as the time sequence?
One more question, the code "conv1 = keras.layers.Conv2D(128, 8, 1, padding='same')(x)" is the order of "filters=128, kernel_size=(8,1)" yeah ?
Hi,about the code "x_train_mean = x_train.mean() x_train_std = x_train.std() " , I have tested that the output is a scalar; It shouldn't be a vector with the same length as the time sequence?
mean() and std() methods in numpy calculate the mean and std respectively of all values in the array and returns a scalar by default
One more question, the code "conv1 = keras.layers.Conv2D(128, 8, 1, padding='same')(x)" is the order of "filters=128, kernel_size=(8,1)" yeah ?
No, it means kernel size=8 and stride=1