kann mir jemand dieses Statement erklären?
Code: Alles auswählen
wshape = [ii for ii in weights.shape if ii > 0]
[[1. 1. 1.]
[1. 1. 0.]
[1. 0. 0.]]
und das Ergebnis wshape ist
[3, 3]
Bin beim Debuggen darauf gestoßen
Danke für eure Antworten
Erhy
Code: Alles auswählen
wshape = [ii for ii in weights.shape if ii > 0]
Code: Alles auswählen
wshape = []
for ii in weights.shape:
if ii > 0:
wshape.append(ii)