2021年3月3日星期三

How to use call() method on Keras model?

I created and trained a model in Keras. I can't figure out how to prepare the inputs for the my_model.call function. Here's what I have:

inputs = pd.DataFrame({'n1': [2],                 'n2': [2]})  inputs = inputs.to_dict()  my_model.call(inputs, training=None, mask=None)  

and this is the error I get:

ValueError: Attempt to convert a value ({0: <tf.Tensor: shape=(), dtype=int32, numpy=2>}) with an unsupported type (<class 'dict'>) to a Tensor.

https://stackoverflow.com/questions/66468269/how-to-use-call-method-on-keras-model March 04, 2021 at 11:47AM

没有评论:

发表评论