Add files via upload

This commit is contained in:
David Rotermund 2023-07-20 01:51:27 +02:00 committed by GitHub
parent 9bb3d5befc
commit 031e35b0b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,9 @@ assert layer_id < len(model)
weights = model[layer_id]._parameters["weight"].data
bias = model[layer_id]._parameters["bias"].data
weight_grid = tv.utils.make_grid(weights, nrow=8, padding=2, scale_each=scale_each)
weight_grid = tv.utils.make_grid(
weights, nrow=8, padding=2, scale_each=scale_each, pad_value=float("NaN")
)
v_max_abs = torch.abs(weight_grid[0, ...]).max()