Category Archives: PyTorch
How to deactivate dropout layers while evaluating and prediction mode in Keras?
Forcing your network to learn redundant representations might sound very inefficient. But in practice, it makes things more robust and prevents overfitting. It also makes your network act as if taking the consensus over an ensemble of networks.
Create DataLoader with collate_fn() for variable-length input in PyTorch.
A custom collate_fn can be used to customize collation, e.g., padding sequential data to a max length of a batch.collate_fn is called with a list of data samples at each time. It is expected to collate the input samples into a batch for yielding from the data loader iterator.