Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def read_input_1c():
- f = open('data/decode_input.txt','r')
- lines = f.read().splitlines()
- #print(len(lines))
- #print(lines)
- X = lines[:100*128]
- #print(len(X))
- X = np.array(X,dtype = np.float64).reshape((100,128)) # X contains 100 letters of size 128 bits each i.e. 100*128
- #print(X.shape[0])
- W = lines[100*128:100*128+26*128]
- W = np.array(W,dtype = np.float64).reshape((26,128)) # W contains the weights for each of the 26 letters at each of the 128 pixels
- #print(W[0][0])
- T = lines[100*128+26*128:]
- T = np.array(T, dtype = np.float64).reshape((26,26)) # T contains the transitions weights for every pair of letters (non-symmetric).
- #print(T[0][0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement