MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _infer

Method _infer

tensorflow/python/layers/normalization_test.py:95–104  ·  view source on GitHub ↗
(self, checkpoint_path, image_val, shape, use_gpu, is_fused)

Source from the content-addressed store, hash-verified

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):

Callers 2

_trainEvalSequenceMethod · 0.95
_testCheckpointMethod · 0.95

Calls 5

_simple_modelMethod · 0.95
sessionMethod · 0.45
placeholderMethod · 0.45
restoreMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected