Skip to content

[BUG] Possibly-incorrect check on ring buffers for WaveNet #144

@sdatkinson

Description

@sdatkinson

This assertion might be incorrect:

if (LAYER_ARRAY_BUFFER_SIZE - num_frames < this->_get_receptive_field())
{
std::stringstream ss;
ss << "Asked to accept a buffer of " << num_frames << " samples, but the buffer is too short ("
<< LAYER_ARRAY_BUFFER_SIZE << ") to get out of the recptive field (" << this->_get_receptive_field()
<< "); copy errors could occur!\n";
throw std::runtime_error(ss.str().c_str());
}

I don't think that it should be the receptive field of the layer array, but the r.f. of the single-largest layer.

Worth thinking about a unit test that could assert this. I think that a WaveNet that implements a delay would work--It shoudl be able to replay the delay even if the receptive field for the whole model is longer than the length of any single ring buffer because of how the information should cascade.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions