don't fail when termcolor is not installed (#436)

This commit is contained in:
cloud11665 2022-11-15 01:45:06 +01:00 committed by GitHub
commit 4fb97b8de0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,9 +11,11 @@ from tinygrad.tensor import Tensor
from tinygrad.nn import Conv2d
try:
from termcolor import colored
except ImportError:
colored = lambda x, _: x
try:
from tinygrad.llops.ops_gpu import CL
except ImportError:
colored = None
CL = None
IN_CHANS = [int(x) for x in os.getenv("IN_CHANS", "4,16,64").split(",")]