nabsabraham / focal-tversky-unet

This repo contains the code for our paper "A novel focal Tversky loss function and improved Attention U-Net for lesion segmentation" accepted at IEEE ISBI 2019.
357 stars 72 forks source link

There is a problem to be solved #21

Closed Halleyawoo closed 4 years ago

Halleyawoo commented 4 years ago

Traceback (most recent call last): File "isic_train.py", line 93, in model = newmodels.attn_reg(sgd, input_size, losses.focal_tversky) File "/media/nomachine/project/focal-tversky-unet-master/newmodels.py", line 241, in attn_reg img_input = Input(shape=input_size, name='input_scale1') File "/home/hfcui/.local/lib/python3.6/site-packages/keras/engine/input_layer.py", line 178, in Input input_tensor=tensor) File "/home/hfcui/.local/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/hfcui/.local/lib/python3.6/site-packages/keras/engine/input_layer.py", line 87, in init name=self.name) File "/home/hfcui/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 541, in placeholder x = tf.placeholder(dtype, shape=shape, name=name) AttributeError: module 'tensorflow' has no attribute 'placeholder'

Halleyawoo commented 4 years ago

import tensorflow.compat.v1 as tf tf.disable_v2_behavior()

is not worked

Halleyawoo commented 4 years ago

solved

HudPesjan commented 3 years ago

import tensorflow.compat.v1 as tf tf.disable_v2_behavior()

is not worked

Hey, I'm having the same problem trying to figure out which version of Keras and TF with CUDA 10.0 to use to run this thing. Would you care to share your solution?