Hey, I have a SoudAnaysisis model (created by CreateML) and I want to access GLM classifier and replace it with my own model. However, when using CoreMlTools there does not seem to be a method for me to access the layers. When I try to loop over layers I get 0 layers. Is there any way for me to access these layers?
Here is my code:
import sys, coremltools
model = coremltools.models.MLModel("model.mlmodel")
spec = model.get_spec() # gets a deep copy
spec = coremltools.utils.load_spec("model.mlmodel")
print(spec.description)
print(spec.WhichOneof("Type"))
for layer in spec.neuralNetworkClassifier.layers:
print(layer.name)
❓Question
Hey, I have a SoudAnaysisis model (created by CreateML) and I want to access GLM classifier and replace it with my own model. However, when using CoreMlTools there does not seem to be a method for me to access the layers. When I try to loop over layers I get 0 layers. Is there any way for me to access these layers? Here is my code:
System Information
Any help will be appreciated
Osian