Caffe2 C++ API is undergoing changes since we are currently working on merging the caffe2 and pytorch backend. There might be breaking changes, but most of them should be easy to fix. For most updated version of caffe2::Tensor, please refer to: https://github.com/pytorch/pytorch/blob/master/caffe2/core/tensor.h
And we'll merge with pytorch Tensor: https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/Tensor.h at some point. Please keep an eye on https://github.com/pytorch/pytorch and https://pytorch.org/ for announcements.