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

Function addSoftmaxLayer

mlmodel/tests/ModelCreationUtils.cpp:151–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151Specification::NeuralNetwork* addSoftmaxLayer(Specification::Model& m, const char *name, const char *input, const char *output) {
152
153 auto neuralNet = m.mutable_neuralnetwork();
154 auto softmaxLayer = neuralNet->add_layers();
155
156 softmaxLayer->set_name(name);
157 softmaxLayer->add_input(input);
158 softmaxLayer->add_output(output);
159 softmaxLayer->mutable_softmax();
160
161 return neuralNet;
162}
163
164Specification::NeuralNetworkClassifier* buildBasicNeuralNetworkClassifierModel(Specification::Model& m, bool isUpdatable, const TensorAttributes *inTensorAttr, std::vector<std::string> stringClassLabels, std::vector<int64_t> intClassLabels, bool includeBias) {
165

Calls 1

set_nameMethod · 0.45

Tested by

no test coverage detected