0

I am trying out some examples using keras models, that are already available. Most of the examples are using keras with tensorflow (or pytorch or theano). Due to limited available resource and cost cutting, I am using plaidml to work with amd gpu. As keras support pluggable backend, I think this may not be an issue. Please share your thoughts about using keras api and later plugging in with desired backend. I have this concern because the samples and this are using keras from tensorflow (import tensorflow.keras) and I am using plain from keras(import keras) with pluggable backend. what is equivalent statement for

img = tf.io.decode_png(img, channels=1)
# 3. Convert to float32 in [0, 1] range
img = tf.image.convert_image_dtype(img, tf.float32)

Is there any limitation going with plain keras api?

Senthil
  • 323
  • 4
  • 15

1 Answers1

0

I just used PIL Image to read and convert an image. It works the same as without using tensorflow api. Most of the keras api can be used irrespective of the backend. There are some caveat with PlaidML as well, there are some function like CTC Loss ctc_batch_cost cannot be found. I got an error like

The Keras backend function 'ctc_batch_cost' is not yet implemented in Plaid. You can help us prioritize by letting us know if this function is important to you, and as always, contributions are welcome!

There are some posts, which provide some sample implementation but it is not straight forward. From PLaidML, the response was that it may not be available soon.

Senthil
  • 323
  • 4
  • 15