Closed cclauss closed 8 years ago
Wonderful change :D . Helps me get started with the server implementation
The modified sudoku.py gives the following error:
Traceback (most recent call last):
File "sudoku.py", line 41, in <module>
snap_sudoku(image_path=sys.argv[1])
File "sudoku.py", line 31, in snap_sudoku
s = SudokuStr(''.join(cell for cell in get_cells(image_path)))
File "sudoku.py", line 31, in <genexpr>
s = SudokuStr(''.join(cell for cell in get_cells(image_path)))
File "sudoku.py", line 24, in get_cells
x = net.feedforward(np.reshape(cell, (784, 1)))
File "/usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 224, in reshape
return _wrapit(a, 'reshape', newshape, order=order)
File "/usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 48, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: total size of new array must be unchanged
Do look into it @cclauss :smile:
Did you retry this after the fix in https://github.com/prajwalkr/SnapSudoku/commit/a3b25dec58d644b259257060f12831a9677bf5cd ?
No. Before fixing that issue.
I think these two issues are related. Can you please sudoku_alt.py
again now that the https://github.com/prajwalkr/SnapSudoku/commit/a3b25dec58d644b259257060f12831a9677bf5cd fix is in?
If that does NOT work, can you please put this line BEFORE line 24 in sudoku_alt.py
and let me know what gets printed?
print('len(cell): {}'.format(len(cell)))
Fixed it myself! :smile:
__init__()
method?res
on-the-fly (list comprehension or generator function)?