You can’t pass pointer to type the  vector<vector<float>> to the torch::from_blob function, because it assumes that you pass pointer to contiguous memory, so you can pass only something like float*. There is vector<T>::data() method in STL.