def main(): args = parser.parse_args() print('Reading NN specification from stdin...', file=sys.stderr) nn = NN.from_string(sys.stdin.read()) num_given = len(args.inputs) num_needed = len(nn.layers[0]) if num_given != num_needed: print( "Error: supplied {0} input values to a {1}-input network.".format(num_given, num_needed), file=sys.stderr ) return 1 print(nn.feed(list(args.inputs)))
def main(): print('Reading NN specification from stdin...', file=sys.stderr) nn = NN.from_string(sys.stdin.read()) print(nn2dot(nn))