Hi. I am trying to calculate per-sample gradient using this idea:

  
      github.com/tensorflow/tensorflow
  
  
    



Issue: Provide unaggregated gradients tensors 1


	
	opened by seerdecker
	on 2016-10-11
	
	
	closed by asimshankar
	on 2016-10-21
	


As described here, TF is inflexible when it comes to access to the gradients:
http://stackoverflow.com/questions/35731506/unaggregated-gradients-gradients-per-example-in-tensorflow?rq=1
Please provide a method where the user can...




  
  
    
    
  
  


So, I have N models and N batches (models are exact copies of each other, sizes of all batches are equal to 1). I have the following code:
outputs = [m(b) for m, b in zip(models, batches)]
Is there a way to parallelize the loop? In my specific case sequential execution of the loop is inefficient.