Closed michaelwachter closed 5 years ago
It seems your file_paths list somehow has floats instead of filepath strings. Can you share the full error message? Also, what format are your images?
` (bachelor) c:\Users\MiHi\GitHub\FC-DenseNet2ClassificationNN_tensorflow\FC-DenseNet-TensorFlow>python main.py WARNING: Logging before flag parsing goes to stderr. W0902 11:21:51.432162 15556 deprecation_wrapper.py:119] From c:\Users\MiHi\GitHub\FC-DenseNet2ClassificationNN_tensorflow\FC-DenseNet-TensorFlow\utility.py:5: The name tf.read_file is deprecated. Please use tf.io.read_file instead.
Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\bachelor\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 527, in _apply_op_helper preferred_dtype=default_dtype) File "C:\ProgramData\Anaconda3\envs\bachelor\lib\site-packages\tensorflow\python\framework\ops.py", line 1224, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\ProgramData\Anaconda3\envs\bachelor\lib\site-packages\tensorflow\python\framework\ops.py", line 1018, in _TensorTensorConversionFunction (dtype.name, t.dtype.name, str(t))) ValueError: Tensor conversion requested dtype string for Tensor with dtype float32: 'Tensor("args_0:0", shape=(), dtype=float32)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 44, in
My Images are in JPG format, i did use the JPG decoder Function from Tensorflow though.
Ok, so i converted the JPG's to PNG, now it runs fine. But i get a OOM Error while running it. I'll open a new issue and close this one.
You could also change the read png function to the read jpeg function in utility.py
OOM errors are common with Tiramisu, since it's memory usage grows quadratically. You can either reduce the batch size, your image size, or the number of layers in the model to resolve them.
I've set the default Path, in the main.py script, to my Dataset Folder:
parser.add_argument("--train_data", default="./dataset/img", help="Directory for training images")
My folder sctruture inside the project looks like this:
When i call the main.py script without arguments, i get the error:
TypeError: Input 'filename' of 'ReadFile' Op has type float32 that does not match expected type of string.