Open mandicLuka opened 3 years ago
Were you able to find a solution? Running into similar issue with my own subclassed model.
@michaelyma12 No solution yet, but my workaround was to copy the function code to a standalone tf function outside the custom layer and repeatedly call the function from the another script. In this case the profiler worked fine
I get this warning when I try to profile my training setup. No step marker observed and hence the step time is unknown. This may happen if (1) training steps are not instrumented
I implemented a custom train_step and a custom layer and network that derive from keras api.
When I use keras api to build model with keras built in layers, everything is fine, even with my custom train_step method. But when I use my custom layer instead of keras layers, I get the aforementioned warning. My training step with my custom layers takes around 30ms. To me it is strange that this profiling is layer dependent.
I even tried putting tf.profiler.experimental.Trace('train') to the train_step function but nothing changed.
Custom layer:
Custom tran_step: