5b5ea7b5d864e53894f5342f19becfba8f8035e5,niftynet/network/interventional_dense_net.py,INetDense,layer_op,#INetDense#Any#Any#Any#Any#,49
Before Change
up_res_3 = UpRes(self.fea[0], **self.res_param)(
up_res_2, conv_0_0, is_training)
conv_5 = Conv(n_output_chns=spatial_rank,
kernel_size=self.k_conv,
with_bias=True,
with_bn=False,
acti_func=None,
**self.disp_param)(up_res_3)
if base_grid is None:
in_spatial_size = [None] * spatial_rank
out_spatial_size = conv_5.get_shape().as_list()[1:-1]
base_grid = _create_affine_features(output_shape=out_spatial_size,
source_shape=in_spatial_size)
base_grid = np.asarray(base_grid[:-1])
base_grid = np.reshape(
base_grid.T, [-1] + out_spatial_size + [spatial_rank])
base_grid = tf.constant(base_grid, dtype=conv_5.dtype)
dense_field = base_grid + conv_5
// TODO filtering
if self.smoothing_func is not None:
dense_field = self.smoothing_func(dense_field, spatial_rank)
return dense_field
After Change
up_res_2, conv_0_0, is_training)
if self.multi_scale_fusion:
output_list = [up_res_3, up_res_2, up_res_1, up_res_0, conv_4]
else:
output_list = [up_res_3]
// converting all output layers to displacement fieldsĀ
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: NifTK/NiftyNet
Commit Name: 5b5ea7b5d864e53894f5342f19becfba8f8035e5
Time: 2017-12-18
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/network/interventional_dense_net.py
Class Name: INetDense
Method Name: layer_op
Project Name: NifTK/NiftyNet
Commit Name: 6f405851fcb3be013441810be9a7edbbc04fd2a3
Time: 2018-05-15
Author: d.shakir@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name: LossFunction
Method Name: layer_op
Project Name: keras-team/keras
Commit Name: 037e592f2ba7c18b71bc9b39f84de11af0252863
Time: 2016-01-08
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: flatten