Esempio n. 1
0
	def test_2(self):
		"""
		See TestDebuggingTF.test_2
		"""
		a,b,c,c2,d=build_graph_ht()
		status,result=tdb.debug([c], feed_dict=None, breakpoints=None, break_immediately=True)
		self.assertEqual(status, tdb.PAUSED)
		status,result=tdb.c() # continue
		self.assertEqual(status, tdb.FINISHED)
		self.assertEqual(result[0],5) # check that c = 5
Esempio n. 2
0
	def test_3(self):
		"""
		with breakpoints
		"""
		# construct TensorFlow graph as usual
		a,b,c,c2,d=build_graph_tf()
		status,result=tdb.debug(d, feed_dict=None, breakpoints=[c], break_immediately=False)
		self.assertEqual(status, tdb.PAUSED)
		self.assertEqual(result, None)
		status,result=tdb.c()
		self.assertEqual(status, tdb.FINISHED)
		self.assertEqual(result[0],-5)
Esempio n. 3
0
	def test_2(self):
		"""
		single eval of the pentultimate node
		breka immediately.
		verify that the execution order does NOT contain d or c2
		"""
		a,b,c,c2,d=build_graph_tf()
		status,result=tdb.debug([c], feed_dict=None, breakpoints=None, break_immediately=True)
		self.assertEqual(status, tdb.PAUSED)
		status,result=tdb.c() # continue
		self.assertEqual(status, tdb.FINISHED)
		self.assertEqual(result[0],5) # check that c = 5
Esempio n. 4
0
    def test_3(self):
        """
		with breakpoints
		"""
        # construct TensorFlow graph as usual
        a, b, c, c2, d = build_graph_tf()
        status, result = tdb.debug(d,
                                   feed_dict=None,
                                   breakpoints=[c],
                                   break_immediately=False)
        self.assertEqual(status, tdb.PAUSED)
        self.assertEqual(result, None)
        status, result = tdb.c()
        self.assertEqual(status, tdb.FINISHED)
        self.assertEqual(result[0], -5)
Esempio n. 5
0
    def test_2(self):
        """
		single eval of the pentultimate node
		breka immediately.
		verify that the execution order does NOT contain d or c2
		"""
        a, b, c, c2, d = build_graph_tf()
        status, result = tdb.debug([c],
                                   feed_dict=None,
                                   breakpoints=None,
                                   break_immediately=True)
        self.assertEqual(status, tdb.PAUSED)
        status, result = tdb.c()  # continue
        self.assertEqual(status, tdb.FINISHED)
        self.assertEqual(result[0], 5)  # check that c = 5