NifTK / NiftyNet

[unmaintained] An open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy
http://niftynet.io
Apache License 2.0
1.37k stars 404 forks source link

Merging GitHub pr 269 #314

Closed wyli closed 5 years ago

wyli commented 5 years ago

Status

READY

Description

merging https://github.com/NifTK/NiftyNet/pull/269 support of single or multiple optimisers in applications: use case 1 (original version)

self.optimiser = tf.train.Opimiser(...)
grads = self.optimiser.computer_gradient(...)
gradients_collector.add_to_collection(grads)

use case 2 (extended)

self.optimiser = tf.train.Optimiser(...)
grads['subnet_1'] = self.optimiser.compute_gradient(...)
grads['subnet_2'] = self.optimiser.compute_gradient(...)
gradients_collector.add_to_collection(grads)

use case 3 (extended)

self.optimiser['subnet_1'] = tf.train.Optimiser(...)
self.optimiser['subnet_2'] = tf.train.Optimiser(...)
grads['subnet_1'] = self.optimiser['subnet-1'].compute_gradient(...)
grads['subnet_2'] = self.optimiser['subnet-2'].compute_gradient(...)
gradients_collector.add_to_collection(grads)

Types of changes