mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-07 15:10:34 +03:00
lint
This commit is contained in:
parent
c41d0dcbce
commit
14a42cbc4a
|
@ -898,6 +898,7 @@ def escape_html(text):
|
||||||
def use_gpu(gpu_id):
|
def use_gpu(gpu_id):
|
||||||
return require_gpu(gpu_id)
|
return require_gpu(gpu_id)
|
||||||
|
|
||||||
|
|
||||||
def gpu_is_available():
|
def gpu_is_available():
|
||||||
try:
|
try:
|
||||||
cupy.cuda.runtime.getDeviceCount()
|
cupy.cuda.runtime.getDeviceCount()
|
||||||
|
@ -905,6 +906,7 @@ def gpu_is_available():
|
||||||
except cupy.cuda.runtime.CUDARuntimeError:
|
except cupy.cuda.runtime.CUDARuntimeError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def fix_random_seed(seed=0):
|
def fix_random_seed(seed=0):
|
||||||
random.seed(seed)
|
random.seed(seed)
|
||||||
numpy.random.seed(seed)
|
numpy.random.seed(seed)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user