I made sure that my dataset contained all images in jpeg format. I read somewhere to use tf.image.decode_jpeg(), but do I still need it even though all files are in jpeg format. If yes, how to do it?

InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-29-c6c91b75df2e> in <module>()
----> 1 model = image_classifier.create(train_data)

11 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     58     ctx.ensure_initialized()
     59     tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
---> 60                                         inputs, attrs, num_outputs)
     61   except core._NotOkStatusException as e:
     62     if name is not None:

InvalidArgumentError: 2 root error(s) found.
  (0) Invalid argument:  Unknown image file format. One of JPEG, PNG, GIF, BMP required.
     [[{{node cond/else/_1/cond/DecodePng}}]]
     [[IteratorGetNext]]
  (1) Invalid argument:  Unknown image file format. One of JPEG, PNG, GIF, BMP required.
     [[{{node cond/else/_1/cond/DecodePng}}]]
     [[IteratorGetNext]]
     [[IteratorGetNext/_2]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_23384]

Function call stack:
train_function -> train_function
0

There are 0 answers