MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / predict

Method predict

digit-recognizer/app/predictors.py:34–38  ·  view source on GitHub ↗
(input_data)

Source from the content-addressed store, hash-verified

32
33 @staticmethod
34 def predict(input_data):
35 assert CNNPredictor.__model, "Use 'CNNPredictor()' to initialize before using 'CNNPredictor.predict()'"
36
37 x = input_data.reshape(1, 28, 28, 1)
38 return CNNPredictor.__model.predict(x).flatten().tolist()

Callers 2

predictFunction · 0.45
predictMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected