Skip to content
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

Add Optional AudioDataLayer and LibSndFile Dependancy #3065

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove c++11 auto statements
aidangomez committed Oct 15, 2015
commit 4853758babd6ed4961f5dfd3ed9adca3f5a1adba
4 changes: 2 additions & 2 deletions src/caffe/layers/audio_data_layer.cpp
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ void AudioDataLayer<Dtype>::load_batch(Batch<Dtype>* batch) {
AudioDataParameter audio_data_param = this->layer_param_.audio_data_param();
const int batch_size = audio_data_param.batch_size();
string root_folder = audio_data_param.root_folder();
auto width = static_cast<int>(this->layer_param_.audio_data_param().width());
int width = static_cast<int>(this->layer_param_.audio_data_param().width());

Datum datum;
datum.set_channels(1);
@@ -119,7 +119,7 @@ void AudioDataLayer<Dtype>::load_batch(Batch<Dtype>* batch) {
timer.Start();

Blob<Dtype> blob(1, 1, 1, width);
auto data = blob.mutable_cpu_data();
Dtype* data = blob.mutable_cpu_data();

ReadAudioFile(root_folder + lines_[lines_id_].first, data, width);