Fixed shebangs, added error checking
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#/usr/bin/env python
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
SVM and KNearest digit recognition.
|
||||
@@ -23,12 +23,19 @@ Usage:
|
||||
digits.py
|
||||
'''
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
# built-in modules
|
||||
from multiprocessing.pool import ThreadPool
|
||||
from common import clock, mosaic
|
||||
|
||||
import cv2
|
||||
|
||||
import numpy as np
|
||||
from numpy.linalg import norm
|
||||
|
||||
# local modules
|
||||
from common import clock, mosaic
|
||||
|
||||
|
||||
|
||||
SZ = 20 # size of each digit is SZ x SZ
|
||||
CLASS_N = 10
|
||||
DIGITS_FN = 'data/digits.png'
|
||||
|
Reference in New Issue
Block a user