I am working with the DCGAN code. I need to modify the reward that is given to one of the neural nets by adding a function that would take the output of this neural net, analyse it, and issue a penalty on it. So my loss function would look like:
self.g_loss = self.g_loss + self.penalty
Problem is
this penalty function only takes the numpy arrays as an input (I have no way of modifying this),
neural network output is a tf.tensor,
and as the values haven't been assigned to the neural net yet (technically it hasn't been built yet) I can't run neither
.eval()norsess.run().
So how would I convert a tensorflow tensor into numpy array in this case?