I think I found the solution.
I didn’t realize the line below returned a dictionary so I had to index it.
outputs = model(inputs)
When I changed it to the line below I no longer get the same error
outputs = model(inputs)['out']