(n,d)
| 14 | s0['regularize'].extend(s1['regularize']) |
| 15 | |
| 16 | def initw(n,d): # initialize matrix of this size |
| 17 | magic_number = 0.1 |
| 18 | return (np.random.rand(n,d) * 2 - 1) * magic_number # U[-0.1, 0.1] |
| 19 | |
| 20 | def accumNpDicts(d0, d1): |
| 21 | """ forall k in d0, d0 += d1 . d's are dictionaries of key -> numpy array """ |