-
Notifications
You must be signed in to change notification settings - Fork 629
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
Fix unit tests and make sure all unit tests pass #385
Conversation
@@ -132,40 +129,6 @@ TEST(Image, add_sample_test) { | |||
CHECK_EQ(image2read.num_records(), num_steps); | |||
} | |||
|
|||
TEST(Image, add_sample_test) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we do not test Image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do, its duplicated, add_sample_test already defined
vector<float> data; | ||
for (int j = 0; j < 3 * 5 * 5; j++) { | ||
data.push_back(float(rand()) / RAND_MAX); | ||
vector<int32_t> shape({16000, 2, 2}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason of changing these numbers? What are their meanings? Just want to learn 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last time I just copied image test and change to audio. Image test they use shape [5,5,3] to represent 5x5 h and w and 3 channels (RGB). In audio, the params are [sample_rate, sample_width, number of channels]
vector<float> data; | ||
for (int j = 0; j < 3 * 5 * 5; j++) { | ||
data.push_back(float(rand()) / RAND_MAX); | ||
vector<uint8_t> data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The audio data we accept is vector of uint8_t type, so I randomly pick numbers from rand() % 256 to create a vector
No description provided.