Created by: Aurelius84
PR types
Function optimization
PR changes
APIs
Describe
enhance error message for StaticLayer.concrete_program.
Before
ValueError: No valid transformed program for function: foo_func(a,b,c,d), input_spec: None.
It will also trigger another error before this in len(flatten_input_spec) > 0
. In this PR, I fix it.
TypeError: object of type 'NoneType' has no len()
After
ValueError: No valid transformed program for function: foo_func(a,b,c,d), input_spec: None.
Please specific `input_spec` in `@paddle.jit.to_static` or feed input tensor to call the decorated function at once.