DebeshJha / 2020-CBMS-DoubleU-Net

Official implementation of DoubleU-Net for Semantic Image Segmentation in TensorFlow & Pytorch (Nominated for Best Paper Award (IEEE CBMS))
https://arxiv.org/pdf/2006.04868.pdf
239 stars 69 forks source link

TypeError: '<' not supported between instances of 'function' and 'str' #9

Closed gunjan5489 closed 3 years ago

gunjan5489 commented 3 years ago

Im getting below error when im using your code predict.py after training on my dataset with 2 classes, please help


TypeError Traceback (most recent call last) /content/drive/MyDrive/Colab Notebooks/2020-CBMS-DoubleU-Net/predict.py in () 93 model = load_model_weight("/content/drive/MyDrive/Colab Notebooks/2020-CBMS-DoubleU-Net/files/dsb-model.h5") 94 model.summary() ---> 95 model.evaluate(test_dataset, steps=test_steps, verbose=1) 96 evaluate_normal(model, test_x, test_y)

10 frames /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py in wrapper(*args, **kwargs) 971 except Exception as e: # pylint:disable=broad-except 972 if hasattr(e, "ag_error_metadata"): --> 973 raise e.ag_error_metadata.to_exception(e) 974 else: 975 raise

TypeError: in user code:

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:1224 test_function  *
    return step_function(self, iterator)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:1215 step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1211 run
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2585 call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2945 _call_for_each_replica
    return fn(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:1210 run_step  **
    with ops.control_dependencies(_minimum_control_deps(outputs)):
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:2764 _minimum_control_deps
    outputs = nest.flatten(outputs, expand_composites=True)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py:338 flatten
    return _pywrap_utils.Flatten(structure, expand_composites)

TypeError: '<' not supported between instances of 'function' and 'str'
dzxrly commented 3 years ago

I got the same problem, how did you solve it?