message: sane h5df file type check for weights
diff: @@ -769,8 +769,7 @@ void Net<Dtype>::CopyTrainedLayersFrom(const NetParameter& param) {
  template <typename Dtype>
  void Net<Dtype>::CopyTrainedLayersFrom(const string trained_filename) {
  - if (trained_filename.size() >= 3 &&
  - trained_filename.compare(trained_filename.size() - 3, 3, ".h5") == 0) {
  + if (H5Fis_hdf5(trained_filename.c_str())) {
  CopyTrainedLayersFromHDF5(trained_filename);
  } else {
  CopyTrainedLayersFromBinaryProto(trained_filename);
  