def printMatrix(): name = input( 'Input matrix\'s name to be printed. (Read from ".mtrx" file)\n>>>') raw = IO.RAWReader() raw.open(p.DATA_PATH + name + '.mtrx') matrix = IO.getAMatrix(raw) IO.printprettyMatrix(matrix)
def feedNeuralNetworkbymtrx(MyNeuralNetwork): name = input('Input .mtrx\'s file name.\n') rawreader = IO.RAWReader() rawreader.open(p.DATA_PATH + name + '.mtrx') M = IO.getAMatrix(rawreader) np.set_printoptions(threshold=np.nan) np.set_printoptions(precision=3) np.set_printoptions(suppress=False) IO.printprettyMatrix(MyNeuralNetwork.feed(M)) pass
def feedNeuralNetwork(MyNeuralNetwork): # string = input('input "row(number of data amount)", "column(number of input layer\'s neuron size)"\n') # string = string + ' ' + input('And then input "elements" row after row.\n') string= '1 '+str(MyNeuralNetwork.LayerNeuronsCount[0])+' ' # Single set of data 1 * input size string = string+input('Input single data set.(split by space and press enter)\n') rawreader = IO.RAWReader() rawreader.openString(string) M = IO.getAMatrix(rawreader) IO.printprettyMatrix(MyNeuralNetwork.feed(M))