Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About TypeError #2

Open
jangjichang opened this issue Mar 15, 2018 · 3 comments
Open

About TypeError #2

jangjichang opened this issue Mar 15, 2018 · 3 comments

Comments

@jangjichang
Copy link

Hi juliafeec.

first, Thank you for sharing your code.

I re-downloaded ".yml" file but I have error.

Traceback (most recent call last): File "/home/jc/PycharmProjects/isbi2017-part1-master/segment.py", line 170, in <module> rescale_mask=rescale_mask, use_hsv=use_hsv, remove_mean_samplewise=remove_mean_samplewise) File "/home/jc/PycharmProjects/isbi2017-part1-master/ISIC_dataset.py", line 64, in load_images img_mask = get_mask(image_name, mask_folder, rescale_mask) File "/home/jc/PycharmProjects/isbi2017-part1-master/ISIC_dataset.py", line 25, in get_mask img_mask = img_mask/255. TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

have you ever seen this error? plz, let me know. Thank you.

@jangjichang
Copy link
Author

jangjichang commented Mar 21, 2018

This error occurred because of datasets.

I download broken files. So I re-download datasets files.

Sorry to have bothered you.

@Abby930
Copy link

Abby930 commented Apr 14, 2018

hi @jangjichang,
I am a freshman in this field. I download this file but I couldn't run it. The error is

Traceback (most recent call last):
File "/Users/zhangdan/Desktop/isic-2017-segmentation-master/segment.py", line 92, in
model = models.Unet(height,width, loss=loss, optimizer = optimizer, metrics = metrics, fc_size = fc_size, channels=n_channels)
File "/Users/zhangdan/Desktop/isic-2017-segmentation-master/models.py", line 22, in Unet
input_with_noise = GaussianNoise(gaussian_noise_std)(inputs)
File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 511, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 569, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 150, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "/usr/local/lib/python2.7/site-packages/keras/layers/noise.py", line 37, in call
return K.in_train_phase(noise_x, x)
File "/usr/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 1107, in in_train_phase
x = tf.python.control_flow_ops.cond(tf.cast(_LEARNING_PHASE, 'bool'),
AttributeError: 'module' object has no attribute 'python'

Have you ever seen this problem? Can you tell me your the version of your keras and tensorflow. Thank you .

@vcvishal
Copy link

vcvishal commented May 4, 2019

i am also facing similar problem i re-downloaded both .yml file and dataset but got this error

Traceback (most recent call last):
File "segment.py", line 170, in
rescale_mask=rescale_mask, use_hsv=use_hsv, remove_mean_samplewise=remove_mean_samplewise)
File "D:\isic-2017-segmentation-master\ISIC_dataset.py", line 64, in load_images
img_mask = get_mask(image_name, mask_folder, rescale_mask)
File "D:\isic-2017-segmentation-master\ISIC_dataset.py", line 25, in get_mask
img_mask = img_mask/255.
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

help me
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants