Nano: update optimizer's examples (#6917)
* update resnet example * update * fix style * update * update vision transformer * fix ut
This commit is contained in:
		
							parent
							
								
									7a8bd4cee5
								
							
						
					
					
						commit
						d90ee7e51e
					
				
					 1 changed files with 13 additions and 15 deletions
				
			
		
							
								
								
									
										28
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -178,22 +178,20 @@ The output of `optimizer.summary()` will be something like:
 | 
			
		|||
 -------------------------------- ---------------------- -------------- ----------------------
 | 
			
		||||
|             method             |        status        | latency(ms)  |       accuracy       |
 | 
			
		||||
 -------------------------------- ---------------------- -------------- ----------------------
 | 
			
		||||
|            original            |      successful      |    43.688    |        0.969         |
 | 
			
		||||
|           fp32_ipex            |      successful      |    33.383    |    not recomputed    |
 | 
			
		||||
|              bf16              |   fail to forward    |     None     |         None         |
 | 
			
		||||
|           bf16_ipex            |    early stopped     |   203.897    |         None         |
 | 
			
		||||
|              int8              |      successful      |    10.74     |        0.969         |
 | 
			
		||||
|            jit_fp32            |      successful      |    38.732    |    not recomputed    |
 | 
			
		||||
|         jit_fp32_ipex          |      successful      |    35.205    |    not recomputed    |
 | 
			
		||||
|  jit_fp32_ipex_channels_last   |      successful      |    19.327    |    not recomputed    |
 | 
			
		||||
|         openvino_fp32          |      successful      |    10.215    |    not recomputed    |
 | 
			
		||||
|         openvino_int8          |      successful      |    8.192     |        0.969         |
 | 
			
		||||
|        onnxruntime_fp32        |      successful      |    20.931    |    not recomputed    |
 | 
			
		||||
|    onnxruntime_int8_qlinear    |      successful      |    8.274     |        0.969         |
 | 
			
		||||
|    onnxruntime_int8_integer    |   fail to convert    |     None     |         None         |
 | 
			
		||||
|            original            |      successful      |    45.145    |        0.975         |
 | 
			
		||||
|              bf16              |      successful      |    27.549    |        0.975         |
 | 
			
		||||
|          static_int8           |      successful      |    11.339    |        0.975         |
 | 
			
		||||
|         jit_fp32_ipex          |      successful      |    40.618    |        0.975*        |
 | 
			
		||||
|  jit_fp32_ipex_channels_last   |      successful      |    19.247    |        0.975*        |
 | 
			
		||||
|         jit_bf16_ipex          |      successful      |    10.149    |        0.975         |
 | 
			
		||||
|  jit_bf16_ipex_channels_last   |      successful      |    9.782     |        0.975         |
 | 
			
		||||
|         openvino_fp32          |      successful      |    22.721    |        0.975*        |
 | 
			
		||||
|         openvino_int8          |      successful      |    5.846     |        0.962         |
 | 
			
		||||
|        onnxruntime_fp32        |      successful      |    20.838    |        0.975*        |
 | 
			
		||||
|    onnxruntime_int8_qlinear    |      successful      |    7.123     |        0.981         |
 | 
			
		||||
 -------------------------------- ---------------------- -------------- ----------------------
 | 
			
		||||
 | 
			
		||||
Optimization cost 64.3s in total.
 | 
			
		||||
* means we assume the precision of the traced model does not change, so we don't recompute accuracy to save time.
 | 
			
		||||
Optimization cost 60.8s in total.
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
</details>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue