Inplace-abn

Latest version: v1.1.0

Safety actively analyzes 629723 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.0.7

This release fixes a compatibility issue with CUDA 10.0, resulting in compilation errors in some cases.

1.0.6

At compile time, when determining whether to enable CUDA support, we now base the decision on the Pytorch version installed:
* If a CUDA-enabled Pytorch is detected, we attempt to compile CUDA support
* If a CPU-only Pytorch is detected, we disable CUDA support

1.0.5

InPlace-ABN can now be compiled and used without CUDA. Note that Synchronized InPlace-ABN is still only supported in conjunction with CUDA-enabled Pytorch.

1.0.4

State dicts from standard BatchNorm layers trained with Pytorch v1.0.0 or newer can now be properly loaded by `ABN`, `InPlaceABN` and `InPlaceABNSync`.

1.0.3

Added a couple of functions to manage distributed groups with `InplaceABNSync`:
* `active_group`: create a distributed group where each worker can decide wether to participate or not.
* `set_active_group`: scan a model, passing a distributed group to all layers that implement a `set_group()` method.

These are intended to simplify handling of asymmetric computational graphs in `DistributedDataParallel` when using `InplaceABNSync`. A typical usage is as follows:
python
class DynamicModel(nn.Module):
def __init__(self):
super(DynamicModel, self).__init__()
self.conv1 = nn.Conv2d(4, 4, 1)
self.bn1 = InplaceABNSync(4)
self.conv2 = nn.Conv2d(4, 4, 1)
self.bn2 = InplaceABNSync(4)

def forward(x):
x = self.conv1(x)
x = self.bn1(x)

Call some data-dependent function telling us wether the second part of the network
should be traversed or not
active = self.get_active(x)

Create process group containing only the active workers, pass it to bn2
set_active_group(self.bn2, active_group(active))

Run the second part of the network only if active is True
if active:
x = self.conv2(x)
x = self.bn2(x)

return x

1.0.2

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.