set_grad_enable¶
Multiprocessing Issues in Docker
PyTorch Specific¶
Using num_workers > 0 for a DataLoader in Docker might causes issues ...
MULTIPROCESSING BEST PRACTICES
Runtime Error with DataLoader: exited unexpectedly #5301
https://forums.fast.ai/t/runtimeerror-dataloader-worker-pid-137-is-killed-by-signal-bus-error/27095
Get the Number of Cores in macOS
Using Shell Command¶
Delete a Layer in a Pretrained Model in PyTorch
It is common to customize a pretrained model by delete the output layer or replace it to the output layer that suits your use case. There are several ways to achieve this in PyTorch.
Replace the Fully Connected Layer with an Identity Layer¶
Define an identity layer.
Replace the fully connected layer with an Identity Layer (using ResNet18 as an example).
Add Columns into a pandas DataFrame
Comment¶
When a Series is added as a new column into a DataFrame, values are added by matching index.