(self)
| 14 | load_path = "" |
| 15 | |
| 16 | def Run(self): |
| 17 | |
| 18 | ### defining the model ### |
| 19 | |
| 20 | #input |
| 21 | input = tf.placeholder(tf.float32, shape=[None, self._input.input_size], name="x_input") |
| 22 | |
| 23 | #output |
| 24 | output = self._model.Run(input) |
| 25 | |
| 26 | #initialize everything |
| 27 | instance = AIBlocks.InitModel(load_path=self.load_path) |
| 28 | Log("Model initialized!") |
| 29 | |
| 30 | #load test data |
| 31 | batch = self._input.getTestBatch() |
| 32 | inputs = batch[0] |
| 33 | real_categories = batch[1] |
| 34 | |
| 35 | predictions = instance.Run(output, feed_dict={input: inputs}) |
| 36 | |
| 37 | for i in range(len(predictions)): |
| 38 | estimation = AIBlocks.MaxIndex(predictions[i]) |
| 39 | real = AIBlocks.MaxIndex(Y_batch[i]) |
| 40 | |
| 41 | if(estimation==real): |
| 42 | #TODO: Do something here... |
| 43 | |
| 44 | AIBlocks.CloseInstance(instance) |
nothing calls this directly
no test coverage detected