Open Lan1991Xu opened 7 years ago
Is the problem caused by Class agent?
Can you reduce this to a complete minimal example that the rest of us can run? And format it so that the indentation is preserved? Thanks.
If I had to guess, tensorflow
is starting a subprocess that runs the code that you want to profile. tensorflow
might have a configuration to run everything in the same process; I don't know.
Hi rkern The problem is still confused me. When I run it in some complete minimal example, it works. However,the original examples still not work. i just pack this documents in dropbox https://www.dropbox.com/sh/9o259gcw187sn1o/AAD3FpRpzjTO5rucrp-RLV1Za?dl=0 There is four documents. The simple one is main1.py agent1.py. Which I call agent1.py(training function) and want to get the detail of agent1.py. It works, while the orginal one does not work. So I think this may not be the problem of Tensorflow. But what actually the problem is still not solved
Hi Rkern Sorry, I think these problem is still exist in main1.py and agent.py. It can derectly run it, but there is no Hit Tim Per Hit %time number. I don't why?
The problem is still likely to be tf.app.run()
.
Yes, I solve it. Thanks
@Lan1991Xu : How did you solve it?
Hi, I meet some problem when I want receive some information from about the train function . this is main function in main.py:
This is another function named agent:
The output is:
When I run kernprof - l -v main.py, it can not print the time of train function line by line, only the information about the each line running time in main.py. I want to know is there some misunderstanding about the line_profile. Thanks