I am getting this error:
error: invalid cast to abstract class type ‘CustomDataset’
auto data = CustomDataset(train_tensor_indices, train_tensor_lab).map(torch::data::transforms::Stack<>());
note: because the following virtual functions are pure within ‘CustomDataset’:
class CustomDataset : public torch::data::Dataset
^
In file included from /libtorch/include/torch/csrc/api/include/torch/data/datasets.h:3:0,
from /libtorch/include/torch/csrc/api/include/torch/data.h:4,
from /libtorch/include/torch/csrc/api/include/torch/all.h:4,
from /libtorch/include/torch/csrc/api/include/torch/torch.h:3,
Custom Dataset class:

class CustomDataset : public torch::data::Dataset {
private:
    torch::Tensor states_, labels_;

public:
	CustomDataset(torch::Tensor emb_indices, torch::Tensor labels) {
		states_ = emb_indices;
     	labels = labels;
     };
     torch::data::Example<> get(size_t index) override {
     	torch::Tensor embedding_index = states_[index];
     	torch::Tensor Label = labels_[index];
     	return {embedding_index.clone(), Label.clone()};
     }; };


auto data = CustomDataset(train_tensor_indices, train_tensor_lab).map(torch::data::transforms::Stack<>());