Fetches an Int8 blob from the workspace and return its real value representation. Inputs: name: the name of the Int8 blob - a string or a BlobReference Returns: real value representation of int8 numpy array
(name)
| 422 | |
| 423 | |
| 424 | def FetchInt8BlobRealVal(name): |
| 425 | """Fetches an Int8 blob from the workspace and return its real value representation. |
| 426 | |
| 427 | Inputs: |
| 428 | name: the name of the Int8 blob - a string or a BlobReference |
| 429 | Returns: |
| 430 | real value representation of int8 numpy array |
| 431 | """ |
| 432 | result = C.fetch_blob(StringifyBlobName(name)) |
| 433 | assert isinstance(result, tuple), \ |
| 434 | 'You are not fetching an Int8Blob {}. Please use FetchBlob'.format( |
| 435 | StringifyBlobName(name)) |
| 436 | int8_blob = Int8Tensor(*result) |
| 437 | return (int8_blob.data.astype(np.int32) - int(int8_blob.zero_point)).astype( |
| 438 | np.float32) * int8_blob.scale |
| 439 | |
| 440 | |
| 441 | def RemoveBlob(name) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…