Question
C++ Overloading I need help implementing maxPooling method for my Matrix class so that main.cpp could support the following statements: M = 16; N =
C++ Overloading
I need help implementing maxPooling method for my Matrix class so that main.cpp could support the following statements:
M = 16; N = 24;
myMatrix matrix1(M, N, allOne); //sets a zero matrix
cout << "matrix1: " << matrix1 << endl;
myMatrix matrix2(M, N, "random");
cout << "matrix2: " << matrix2 << endl;
myMatrix matrix3(3, 3, "random");
cout << "matrix3: " << matrix3 << endl;
matrix2 = matrix1 + matrix2
cout << "matrix2: " << matrix2 << endl;
matrix2 = matrix2 * matrix3 //convolution
cout << "matrix2: " << matrix2 << endl;
matrix2 = matrix2.maxPooling() //Max pooling
cout << "matrix2: " << matrix2 << endl;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started