-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convolution 1D CNTK C++ #3862
Comments
Here is an example implementation of a conv1D() function in C++ that is similar to the one in TensorFlow:
This implementation defines a conv1D() function that takes an input data vector, a filter vector, and a stride value as inputs, and returns the convolved output data as a vector. It also includes code to reshape the input and output data to match the shapes you provided. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. Help me create a conv1D () function like Tensorflow.
I described the code, but I'm not sure if it works the way I need it. Because the result is different from a similar model written in python Tensorflow. I'm not sure what the problem is here.
Code c++:
inputl = InputVariable({ DataShape.TotalSize() }, false, DataType::Float, L"features");
auto input = Reshape(inputl, DataShape);
inputl->AsString() ------>>> Composite(Reshape): Input('features', [20000], [, #]) -> Output('Reshape1_Output_0', [500x 40], [, #])
auto convParam = Parameter({ 1, 40, 512}, AsDataType(), GlorotUniformInitializer());
auto layer = Convolution(convParam, input, { 1, 40}, { true }, { true }, { 1}, 1);
layer ->AsString() ------>>> "Composite(BatchNormalization): Input('features', [20000], [, #]) -> Output('BatchNormalization16_Output_0', [500x 512], [, #])"
I need something like:
Input data shape: 20000 = (40,40,40,......,40) = 500*40
After reshape input data, shape = (500, 40)
conv1D()
Output shape data = (400, 512)
The text was updated successfully, but these errors were encountered: