Open dreamflyer opened 7 years ago
Hi. I am sorry, it looks like the Keras 2 version of the code has some issues still. I need to look at it more carefully.
The warning seems to be saying that the code is using the previous Keras API, which is deprecated.
Since the code actually ran and gave some results I guess that the problem is not in the dim_ordering/image_data_format. The weights I provided were generated from Keras version 1.2.2 and I am not sure if they are still valid on Keras 2. If you want to use those weights I would advise you to use Keras 1.2.2.
Is it possible to use the code without the weights?
(C:\Users\green\Anaconda3\envs\py35) C:\Users\green\Documents\Data\input>python train.py [--base_dir][C:/Users/green/Documen
ts/Data Competitions/Data Science Bowl 2018/input/data/unet_segmentations_binary
] [--train] [--val]
C:\Users\green\Anaconda3\envs\py35\lib\site-packages\h5py__init.py:36: Future
Warning: Conversion of the second argument of issubdtype from float
to np.flo ating
is deprecated. In future, it will be treated as np.float64 == np.dtype(f loat).type
.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
TheanoShapedU-NET
2018-02-13 13:08:28.098000: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\
35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn
't compiled to use AVX instructions, but these are available on your machine and
could speed up CPU computations.
2018-02-13 13:08:28.098274: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\
35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn
't compiled to use AVX2 instructions, but these are available on your machine an
d could speed up CPU computations.
Traceback (most recent call last):
File "train.py", line 326, in
Looking at code, i see that only 'tf', 'th', or 'default' can be passed in img_to_array method as second argument, but method is expecting one of 'channels_first' or 'channels_last'. So it looks like it is shouldn't to work. May be i have wrong version of image.py? However, even after i manually specify 'channels_first' instead of self.dim_ordering in img_to_array call, and test.py runs without issues, i have strange result with weights that provided by reference in readme:
sample image for test was downloaded from demo that provided in readme.
what i am doing wrong? Also please note that i'm on Mac OS X Yosemite, and without GPU usage, may be thats the reason?
Also, can you please comment what this warnings are mean?