shreyajn commited on
Commit
cc9e408
·
verified ·
1 Parent(s): c226d55

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +0 -6
README.md CHANGED
@@ -138,14 +138,11 @@ from qai_hub_models.models.openai_clip import CLIPTextEncoder,CLIPImageEncoder
138
 
139
  # Load the model
140
  text_encoder_model = CLIPTextEncoder.from_pretrained()
141
-
142
  image_encoder_model = CLIPImageEncoder.from_pretrained()
143
 
144
-
145
  # Device
146
  device = hub.Device("Samsung Galaxy S23")
147
 
148
-
149
  # Trace model
150
  text_encoder_input_shape = text_encoder_model.get_input_spec()
151
  text_encoder_sample_inputs = text_encoder_model.sample_inputs()
@@ -161,7 +158,6 @@ text_encoder_compile_job = hub.submit_compile_job(
161
 
162
  # Get target model to run on-device
163
  text_encoder_target_model = text_encoder_compile_job.get_target_model()
164
-
165
  # Trace model
166
  image_encoder_input_shape = image_encoder_model.get_input_spec()
167
  image_encoder_sample_inputs = image_encoder_model.sample_inputs()
@@ -188,12 +184,10 @@ After compiling models from step 1. Models can be profiled model on-device using
188
  provisioned in the cloud. Once the job is submitted, you can navigate to a
189
  provided job URL to view a variety of on-device performance metrics.
190
  ```python
191
-
192
  text_encoder_profile_job = hub.submit_profile_job(
193
  model=text_encoder_target_model,
194
  device=device,
195
  )
196
-
197
  image_encoder_profile_job = hub.submit_profile_job(
198
  model=image_encoder_target_model,
199
  device=device,
 
138
 
139
  # Load the model
140
  text_encoder_model = CLIPTextEncoder.from_pretrained()
 
141
  image_encoder_model = CLIPImageEncoder.from_pretrained()
142
 
 
143
  # Device
144
  device = hub.Device("Samsung Galaxy S23")
145
 
 
146
  # Trace model
147
  text_encoder_input_shape = text_encoder_model.get_input_spec()
148
  text_encoder_sample_inputs = text_encoder_model.sample_inputs()
 
158
 
159
  # Get target model to run on-device
160
  text_encoder_target_model = text_encoder_compile_job.get_target_model()
 
161
  # Trace model
162
  image_encoder_input_shape = image_encoder_model.get_input_spec()
163
  image_encoder_sample_inputs = image_encoder_model.sample_inputs()
 
184
  provisioned in the cloud. Once the job is submitted, you can navigate to a
185
  provided job URL to view a variety of on-device performance metrics.
186
  ```python
 
187
  text_encoder_profile_job = hub.submit_profile_job(
188
  model=text_encoder_target_model,
189
  device=device,
190
  )
 
191
  image_encoder_profile_job = hub.submit_profile_job(
192
  model=image_encoder_target_model,
193
  device=device,