(self, checkpoint_path, image_val, shape, use_gpu, is_fused)
| 93 | saver.save(sess, checkpoint_path) |
| 94 | |
| 95 | def _infer(self, checkpoint_path, image_val, shape, use_gpu, is_fused): |
| 96 | dtype = image_val.dtype |
| 97 | ops.reset_default_graph() |
| 98 | graph = ops.get_default_graph() |
| 99 | with self.session(graph=graph, use_gpu=use_gpu) as sess: |
| 100 | image = array_ops.placeholder(dtype=dtype, shape=shape) |
| 101 | loss, _, saver = self._simple_model(image, is_fused, True) |
| 102 | saver.restore(sess, checkpoint_path) |
| 103 | loss_val = sess.run(loss, feed_dict={image: image_val}) |
| 104 | return loss_val |
| 105 | |
| 106 | def _trainEvalSequence(self, dtype, train1_use_gpu, train2_use_gpu, |
| 107 | infer_use_gpu): |
no test coverage detected