Real-ESRGAN-TensorFlow icon indicating copy to clipboard operation
Real-ESRGAN-TensorFlow copied to clipboard

Error on Use model

Open HosseinMoazzam opened this issue 1 year ago • 0 comments

Hi, thanks to your project. I have this error on using model, please guide me if you can!

I installed the dependencies by requirements.txt, and put the images inside the data/user_images folder and run:

python use_model.py --use_ema_model --batch_size=1

I get this error:

Traceback (most recent call last): File "D:\RESRGAN-TF\use_model.py", line 35, in output = model(img) File "D:\RESRGAN-TF\lib\site-packages\keras\utils\traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None File "D:\PYVENV\RESRGAN-TF\lib\site-packages\tensorflow\python\saved_model\function_deserialization.py", line 289, in restored_function_body raise ValueError( ValueError: Exception encountered when calling layer "rrdb_net_1" (type RRDBNet).

Could not find matching concrete function to call loaded from the SavedModel. Got: Positional arguments (1 total): * Tensor("x_input:0", shape=(1, 200, 200, 3), dtype=float32) Keyword arguments: {}

Expected these arguments to match one of the following 2 option(s):

Option 1: Positional arguments (1 total): * TensorSpec(shape=(None, 481, 481, 3), dtype=tf.float32, name='x_input') Keyword arguments: {}

Option 2: Positional arguments (1 total): * TensorSpec(shape=(None, 481, 481, 3), dtype=tf.float32, name='input_1') Keyword arguments: {}

Call arguments received: • args=('tf.Tensor(shape=(1, 200, 200, 3), dtype=float32)',) • kwargs=<class 'inspect._empty'>

Please guide me!

HosseinMoazzam avatar Dec 21 '23 10:12 HosseinMoazzam