PyTorch: How to use DataLoaders for custom Datasets

Yes, that is possible. Just create the objects by yourself, e.g. import torch.utils.data as data_utils train = data_utils.TensorDataset(features, targets) train_loader = data_utils.DataLoader(train, batch_size=50, shuffle=True) where features and targets are tensors. features has to be 2-D, i.e. a matrix where each line represents one training sample, and targets may be 1-D or 2-D, depending on whether … Read more

Can’t install distlearn through a firewall

The rockspec code has a built-in, tacit requirement to use git protocol. From behind a firewall, one must use HTTPS. luarocks has no proxy environment variable to configure this from the command line, so the installation fails. Fortunately, there is a way to reconfigure git: sudo git config –global url.”https://”.insteadOf git:// This forces all git … Read more