add necessary input checks for matcaffe

In this pull request, input checks are added for MatCaffe to ensure that:
1. the input data is single-precision float point data
2. the number of elements in input data matches the input size of the network