Add files via upload
This commit is contained in:
parent
a564b10114
commit
b346d947b1
2 changed files with 15 additions and 14 deletions
|
@ -4,12 +4,13 @@ import matplotlib.pyplot as plt
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
from natsort import natsorted
|
from natsort import natsorted
|
||||||
|
import sys
|
||||||
|
|
||||||
# import numpy as np
|
# import numpy as np
|
||||||
|
|
||||||
layer_id: int = 3
|
layer_id: int = int(sys.argv[1])
|
||||||
scale_each_inner: bool = False
|
scale_each_inner: bool = True
|
||||||
scale_each_outer: bool = False
|
scale_each_outer: bool = True
|
||||||
|
|
||||||
model_path: str = "trained_models"
|
model_path: str = "trained_models"
|
||||||
filename_list: list = natsorted(glob.glob(os.path.join(model_path, str("*.pt"))))
|
filename_list: list = natsorted(glob.glob(os.path.join(model_path, str("*.pt"))))
|
||||||
|
@ -47,12 +48,12 @@ v_max_abs = torch.abs(weight_grid[0, ...]).max()
|
||||||
plt.subplot(3, 1, (1, 2))
|
plt.subplot(3, 1, (1, 2))
|
||||||
plt.imshow(
|
plt.imshow(
|
||||||
weight_grid[0, ...],
|
weight_grid[0, ...],
|
||||||
vmin=-v_max_abs,
|
# vmin=-v_max_abs,
|
||||||
vmax=v_max_abs,
|
# vmax=v_max_abs,
|
||||||
cmap="cool",
|
cmap="hot",
|
||||||
)
|
)
|
||||||
plt.axis("off")
|
plt.axis("off")
|
||||||
plt.colorbar()
|
#plt.colorbar()
|
||||||
plt.title("Weights")
|
plt.title("Weights")
|
||||||
|
|
||||||
plt.subplot(3, 1, 3)
|
plt.subplot(3, 1, 3)
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
],
|
],
|
||||||
"conv_kernel_size": [
|
"conv_kernel_size": [
|
||||||
11,
|
11,
|
||||||
7,
|
11,
|
||||||
15
|
11
|
||||||
],
|
],
|
||||||
"conv_stride_size": [
|
"conv_stride_size": [
|
||||||
1,
|
1,
|
||||||
|
@ -30,14 +30,14 @@
|
||||||
"l_relu_negative_slope": 0.1, // (0.1)
|
"l_relu_negative_slope": 0.1, // (0.1)
|
||||||
// Pooling layer -----------------------------------------------------------
|
// Pooling layer -----------------------------------------------------------
|
||||||
"pooling_kernel_size": [
|
"pooling_kernel_size": [
|
||||||
3,
|
5,
|
||||||
0,
|
5,
|
||||||
0
|
5
|
||||||
],
|
],
|
||||||
"pooling_stride": [
|
"pooling_stride": [
|
||||||
2,
|
2,
|
||||||
0,
|
2,
|
||||||
0
|
2
|
||||||
],
|
],
|
||||||
"pooling_type": "max", // (max), average, none
|
"pooling_type": "max", // (max), average, none
|
||||||
// Softmax layer -----------------------------------------------------------
|
// Softmax layer -----------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue