MCPcopy Create free account
hub / github.com/apple/coremltools / _convert_to_float

Function _convert_to_float

coremltools/models/utils.py:1025–1028  ·  view source on GitHub ↗
(feature)

Source from the content-addressed store, hash-verified

1023 """
1024
1025 def _convert_to_float(feature):
1026 if feature.type.HasField("multiArrayType"):
1027 if feature.type.multiArrayType.dataType == _proto.Model_pb2.ArrayFeatureType.DOUBLE:
1028 feature.type.multiArrayType.dataType = _proto.Model_pb2.ArrayFeatureType.FLOAT32
1029
1030 for feature in spec.description.input:
1031 _convert_to_float(feature)

Calls 1

HasFieldMethod · 0.45

Tested by

no test coverage detected