python - How to access the network weights while using ...
stackoverflow.com › questions › 56435961Jun 04, 2019 · Code: input_size = 784 hidden_sizes = [128, 64] output_size = 10 # Build a feed-forward network model = nn.Sequential (nn.Linear (input_size, hidden_sizes [0]), nn.ReLU (), nn.Linear (hidden_sizes [0], hidden_sizes [1]), nn.ReLU (), nn.Linear (hidden_sizes [1], output_size), nn.Softmax (dim=1)) I expected to get the weights but I got