Commit 79a620b1 authored by Davis King's avatar Davis King

Added assert to improve error messages.

parent 8365bf68
......@@ -1464,6 +1464,8 @@ namespace dlib
template <typename SUBNET>
void forward(const SUBNET& sub, resizable_tensor& output)
{
DLIB_CASSERT(num_inputs == sub.get_output().nr()*sub.get_output().nc()*sub.get_output().k(),
"The size of the input tensor to this fc layer doesn't match the size the fc layer was trained with.");
output.set_size(sub.get_output().num_samples(), num_outputs);
auto w = weights(params, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment