@@ -59,7 +59,7 @@ from coremltools.models.ml_program.experimental.debugging_utils import MLModelVa
5959# Initialize MLModelValidator
6060validator = MLModelValidator(
6161 model = model,
62- compute_unit = ct.ComputeUnit.CPU_ONLY ,
62+ compute_units = ct.ComputeUnit.CPU_ONLY ,
6363)
6464# Find the ops that are responsible for NaN output
6565failing_ops = await validator.find_failing_ops_with_nan_output(
@@ -79,7 +79,7 @@ from coremltools.models.ml_program.experimental.debugging_utils import MLModelVa
7979# Initialize MLModelValidator
8080validator = MLModelValidator(
8181 model = model,
82- compute_unit = ct.ComputeUnit.CPU_ONLY ,
82+ compute_units = ct.ComputeUnit.CPU_ONLY ,
8383)
8484# Find the ops that are responsible for NaN output
8585failing_ops = await validator.find_failing_ops_with_infinite_output(
@@ -101,7 +101,7 @@ from coremltools import proto
101101# Initialize MLModelValidator
102102validator = MLModelValidator(
103103 model = model,
104- compute_unit = ct.ComputeUnit.CPU_ONLY ,
104+ compute_units = ct.ComputeUnit.CPU_ONLY ,
105105)
106106
107107def validate_output (op : proto.MIL_pb2 .Operation, value : np.array):
@@ -199,7 +199,7 @@ comparator = TorchScriptMLModelComparator(
199199 coremltools.TensorType(name = " x" , shape = inputs[0 ].shape, dtype = np.float32),
200200 coremltools.TensorType(name = " y" , shape = inputs[1 ].shape, dtype = np.float32),
201201 ],
202- compute_unit = ct.ComputeUnit.CPU_ONLY ,
202+ compute_units = ct.ComputeUnit.CPU_ONLY ,
203203)
204204
205205# Define a custom comparison function
@@ -255,7 +255,7 @@ comparator = TorchExportMLModelComparator(
255255 ct.TensorType(name = " x" , shape = inputs[0 ].shape, dtype = np.float32),
256256 ct.TensorType(name = " y" , shape = inputs[1 ].shape, dtype = np.float32),
257257 ],
258- compute_unit = ct.ComputeUnit.CPU_ONLY ,
258+ compute_units = ct.ComputeUnit.CPU_ONLY ,
259259)
260260
261261# Define a custom comparison function
0 commit comments