Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -190,11 +190,17 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
190 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
191 |
provided job URL to view a variety of on-device performance metrics.
|
192 |
```python
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
device=device,
|
196 |
-
)
|
197 |
-
|
198 |
```
|
199 |
|
200 |
Step 3: **Verify on-device accuracy**
|
@@ -202,13 +208,20 @@ Step 3: **Verify on-device accuracy**
|
|
202 |
To verify the accuracy of the model on-device, you can run on-device inference
|
203 |
on sample input data on the same cloud hosted device.
|
204 |
```python
|
205 |
-
|
206 |
-
|
207 |
-
model=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
device=device,
|
209 |
-
inputs=
|
210 |
)
|
211 |
-
|
212 |
|
213 |
```
|
214 |
With the output of the model, you can compute like PSNR, relative errors or
|
|
|
190 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
191 |
provided job URL to view a variety of on-device performance metrics.
|
192 |
```python
|
193 |
+
|
194 |
+
encoder_profile_job = hub.submit_profile_job(
|
195 |
+
model=encoder_target_model,
|
196 |
+
device=device,
|
197 |
+
)
|
198 |
+
|
199 |
+
decoder_profile_job = hub.submit_profile_job(
|
200 |
+
model=decoder_target_model,
|
201 |
device=device,
|
202 |
+
)
|
203 |
+
|
204 |
```
|
205 |
|
206 |
Step 3: **Verify on-device accuracy**
|
|
|
208 |
To verify the accuracy of the model on-device, you can run on-device inference
|
209 |
on sample input data on the same cloud hosted device.
|
210 |
```python
|
211 |
+
encoder_input_data = encoder_model.sample_inputs()
|
212 |
+
encoder_inference_job = hub.submit_inference_job(
|
213 |
+
model=encoder_target_model,
|
214 |
+
device=device,
|
215 |
+
inputs=encoder_input_data,
|
216 |
+
)
|
217 |
+
encoder_inference_job.download_output_data()
|
218 |
+
decoder_input_data = decoder_model.sample_inputs()
|
219 |
+
decoder_inference_job = hub.submit_inference_job(
|
220 |
+
model=decoder_target_model,
|
221 |
device=device,
|
222 |
+
inputs=decoder_input_data,
|
223 |
)
|
224 |
+
decoder_inference_job.download_output_data()
|
225 |
|
226 |
```
|
227 |
With the output of the model, you can compute like PSNR, relative errors or
|