mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
Start implementing inception modules tests
This commit is contained in:
43
examples/inception_v3/tests/test_basic_conv2d.cpp
Normal file
43
examples/inception_v3/tests/test_basic_conv2d.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <inception_v3.hpp>
|
||||
|
||||
class BasicConv2dTest : public ::testing::Test {
|
||||
protected:
|
||||
BasicConv2d *basic_conv2d;
|
||||
|
||||
shape2d inputShape;
|
||||
int inputChannels;
|
||||
int outputChannels;
|
||||
shape2d kernelSize;
|
||||
shape2d stride;
|
||||
shape2d padding;
|
||||
std::string prefix = "test";
|
||||
|
||||
float *d_input;
|
||||
float *d_output;
|
||||
|
||||
std::vector<float> input;
|
||||
std::vector<float> output;
|
||||
|
||||
std::vector<float> weights;
|
||||
std::vector<float> biases;
|
||||
|
||||
virtual void SetUp() override {
|
||||
basic_conv2d = nullptr;
|
||||
}
|
||||
|
||||
virtual void TearDown() override {
|
||||
// Clean up
|
||||
delete basic_conv2d;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(BasicConv2dTest, BasicConv2dTest1) {
|
||||
inputShape = {28, 28};
|
||||
inputChannels = 1;
|
||||
outputChannels = 32;
|
||||
kernelSize = {3, 3};
|
||||
stride = {1, 1};
|
||||
padding = {1, 1};
|
||||
};
|
||||
Reference in New Issue
Block a user