Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -136,14 +136,11 @@ from qai_hub_models.models.trocr import TrOCREncoder,TrOCRDecoder
|
|
| 136 |
|
| 137 |
# Load the model
|
| 138 |
encoder_model = TrOCREncoder.from_pretrained()
|
| 139 |
-
|
| 140 |
decoder_model = TrOCRDecoder.from_pretrained()
|
| 141 |
|
| 142 |
-
|
| 143 |
# Device
|
| 144 |
device = hub.Device("Samsung Galaxy S23")
|
| 145 |
|
| 146 |
-
|
| 147 |
# Trace model
|
| 148 |
encoder_input_shape = encoder_model.get_input_spec()
|
| 149 |
encoder_sample_inputs = encoder_model.sample_inputs()
|
|
@@ -159,7 +156,6 @@ encoder_compile_job = hub.submit_compile_job(
|
|
| 159 |
|
| 160 |
# Get target model to run on-device
|
| 161 |
encoder_target_model = encoder_compile_job.get_target_model()
|
| 162 |
-
|
| 163 |
# Trace model
|
| 164 |
decoder_input_shape = decoder_model.get_input_spec()
|
| 165 |
decoder_sample_inputs = decoder_model.sample_inputs()
|
|
@@ -186,12 +182,10 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
| 186 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 187 |
provided job URL to view a variety of on-device performance metrics.
|
| 188 |
```python
|
| 189 |
-
|
| 190 |
encoder_profile_job = hub.submit_profile_job(
|
| 191 |
model=encoder_target_model,
|
| 192 |
device=device,
|
| 193 |
)
|
| 194 |
-
|
| 195 |
decoder_profile_job = hub.submit_profile_job(
|
| 196 |
model=decoder_target_model,
|
| 197 |
device=device,
|
|
|
|
| 136 |
|
| 137 |
# Load the model
|
| 138 |
encoder_model = TrOCREncoder.from_pretrained()
|
|
|
|
| 139 |
decoder_model = TrOCRDecoder.from_pretrained()
|
| 140 |
|
|
|
|
| 141 |
# Device
|
| 142 |
device = hub.Device("Samsung Galaxy S23")
|
| 143 |
|
|
|
|
| 144 |
# Trace model
|
| 145 |
encoder_input_shape = encoder_model.get_input_spec()
|
| 146 |
encoder_sample_inputs = encoder_model.sample_inputs()
|
|
|
|
| 156 |
|
| 157 |
# Get target model to run on-device
|
| 158 |
encoder_target_model = encoder_compile_job.get_target_model()
|
|
|
|
| 159 |
# Trace model
|
| 160 |
decoder_input_shape = decoder_model.get_input_spec()
|
| 161 |
decoder_sample_inputs = decoder_model.sample_inputs()
|
|
|
|
| 182 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 183 |
provided job URL to view a variety of on-device performance metrics.
|
| 184 |
```python
|
|
|
|
| 185 |
encoder_profile_job = hub.submit_profile_job(
|
| 186 |
model=encoder_target_model,
|
| 187 |
device=device,
|
| 188 |
)
|
|
|
|
| 189 |
decoder_profile_job = hub.submit_profile_job(
|
| 190 |
model=decoder_target_model,
|
| 191 |
device=device,
|