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
parent 5e07d4669d
commit 4fb97b8de0

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(",")]