d1e6e624ef891543c5bba32bb0a696d350714693,coremltools/models/utils.py,,_convert_nn_spec_to_half_precision,#Any#,172
Before Change
for layer in layers:
layer_type = layer.WhichOneof("layer")
if layer_type in ignored_layers:
continue
// Convolution
if layer_type == "convolution":
_wp_to_fp16wp(layer.convolution.weights)
if layer.convolution.hasBias:
_wp_to_fp16wp(layer.convolution.bias)
After Change
"be converted manually".format(layer.name))
continue
if layer_type not in quantized_layers:
params = getattr(layer, layer_type, None)
params = params.ListFields() if params else []
param_types = [p[0].message_type.name if p[0].message_type else None for p in params]
if "WeightParams" in param_types:
raise NotImplementedError("Quantization for layer "" + layer_type + "" not implemented.")
continue // print("Skipping layer {}. No need to quantize.".format(layer.name))
// Convolution
if layer_type == "convolution":
_wp_to_fp16wp(layer.convolution.weights)
if layer.convolution.hasBias:
_wp_to_fp16wp(layer.convolution.bias)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: apple/coremltools
Commit Name: d1e6e624ef891543c5bba32bb0a696d350714693
Time: 2019-08-20
Author: smq@apple.com
File Name: coremltools/models/utils.py
Class Name:
Method Name: _convert_nn_spec_to_half_precision
Project Name: uber/pyro
Commit Name: be8334dd7eee7dbea05400e5864c6c9a8ec25cae
Time: 2020-04-05
Author: fehiepsi@gmail.com
File Name: pyro/infer/mcmc/util.py
Class Name:
Method Name: initialize_model
Project Name: deepdrive/deepdrive
Commit Name: 6e0c869f5e17c734010fe7cc1b975ef178af9d1c
Time: 2018-04-26
Author: cquiter@gmail.com
File Name: agents/dagger/train/train.py
Class Name:
Method Name: run