mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
parent
cc0e7bee76
commit
2bf54bcaa2
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ from onnx import ModelProto, SparseTensorProto, TensorProto, numpy_helper
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
real_types = set((np.float32, np.float64, np.double))
|
||||
real_types = set((int(TensorProto.FLOAT), int(TensorProto.DOUBLE)))
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
|
|
@ -67,7 +67,7 @@ def convert_tensor_to_sparse(tensor, tolerance): # type: (TensorProto) -> Tuple
|
|||
else:
|
||||
for index in range(data_len):
|
||||
el = tensor_data[index]
|
||||
if el == 0:
|
||||
if el != 0:
|
||||
values.append(el)
|
||||
indicies.append(index)
|
||||
nnz_count += 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue