fa7ee697076d2061faeaf7ebf20cdcd5da352eae,tests/application_driver_test.py,ApplicationDriverTest,test_multi_device_multi_optimiser_gradients,#ApplicationDriverTest#,193
Before Change
self.assertGreater(np.sum(np.abs(g_1 - g_2)), 0.0, msg)
self.assertGreater(np.sum(np.abs(g_1 - g_3)), 0.0, msg)
self.assertGreater(np.sum(np.abs(g_2 - g_3)), 0.0, msg)
g_array = np.concatenate([g_0.reshape((1, -1)),
g_1.reshape((1, -1)),
g_2.reshape((1, -1)),
g_3.reshape((1, -1))], axis=0)
g_ave = g_ave.reshape(-1)
g_np_ave = np.mean(g_array, axis=0)
self.assertAllClose(g_np_ave, g_ave)
SESS_FINISHED.send(test_driver.app, itermsg=None)
test_driver.app.stop()
After Change
])
// query sample discriminator gradient to check
gen_0, gen_1, gen_2, gen_3, gen_ave = sess.run([
tf.get_default_graph().get_tensor_by_name(
"worker_0/ComputeGradients/gradients_1/worker_0/tinynet/G/conv/conv_/conv/ExpandDims_1_grad/Reshape:0"),
tf.get_default_graph().get_tensor_by_name(
"worker_1/ComputeGradients/gradients_1/worker_1/tinynet/G/conv/conv_/conv/ExpandDims_1_grad/Reshape:0"),
tf.get_default_graph().get_tensor_by_name(
"worker_2/ComputeGradients/gradients_1/worker_2/tinynet/G/conv/conv_/conv/ExpandDims_1_grad/Reshape:0"),
tf.get_default_graph().get_tensor_by_name(
"worker_3/ComputeGradients/gradients_1/worker_3/tinynet/G/conv/conv_/conv/ExpandDims_1_grad/Reshape:0"),
tf.get_default_graph().get_tensor_by_name(
"ApplyGradients_1/AveOverDevices_8:0")
])
self.check_gradients(gen_0, gen_1, gen_2, gen_3, gen_ave)
self.check_gradients(dis_0, dis_1, dis_2, dis_3, dis_ave)
SESS_FINISHED.send(test_driver.app, itermsg=None)
test_driver.app.stop()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: NifTK/NiftyNet
Commit Name: fa7ee697076d2061faeaf7ebf20cdcd5da352eae
Time: 2018-10-30
Author: elias.tappeiner@umit.at
File Name: tests/application_driver_test.py
Class Name: ApplicationDriverTest
Method Name: test_multi_device_multi_optimiser_gradients
Project Name: deepdrive/deepdrive
Commit Name: e64f1d7b07d376634107751903c38e18560ac203
Time: 2018-05-19
Author: cquiter@gmail.com
File Name: agents/dagger/train/hdf5_to_tfrecord.py
Class Name:
Method Name: decode
Project Name: tensorflow/cleverhans
Commit Name: b214ee503bf7e8a27b6d89460e49fb12a5b8d947
Time: 2016-11-22
Author: ngp5056@cse.psu.edu
File Name: cleverhans/attacks.py
Class Name:
Method Name: jacobian