def create_inputs(self, image_size):
print("Creating input Placeholders...")
#input image
self.X = tf.placeholder(dtype=tf.float32,
shape=[None, image_size[0], image_size[1], 1],
name="in")
#Outputs of the different heads
#Nodule head
self.Y_nodule = tf.placeholder(dtype=tf.float32,
shape=[None, image_size[0], image_size[1], 1],
name="out_nodule")
self.Y_nodule_weight = tf.placeholder_with_default(input=1.0,
shape=None,
name="nodule_weight")
#Cancer head
self.Y_cancer = tf.placeholder(dtype=tf.float32,
shape=[None, 1],
name="out_cancer")
self.Y_cancer_weight = tf.placeholder_with_default(input=1.0,
shape=None,
name="cancer_weight")
#Boolean variables to check head and mode
self.is_training = tf.placeholder(dtype=tf.bool,
name="is_training")
self.is_nodule = tf.placeholder(dtype=tf.bool,
name="is_nodule")
self.is_cancer = tf.placeholder(dtype=tf.bool,
name="is_cancer")
#Probability for dropout
self.drop_prob = tf.placeholder_with_default(input=0.0,
shape=None,
name="dropout_probability")
print("Created input placeholders!")
aggressive_multi_head_UNET_2d.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录