How to print values ​​from inside anano function?

I recently switched from Matlab / C ++ to theano and executed the following function

train_model = theano.function([x_in, y_index],
                          classifier.cost,
                          updates=updates,
                          givens={
                              x: x_in,
                              y: y_in[y_index]})

and I would like to print the values ​​between two layers of the network at each iteration (for debugging, better control over the function, etc.), I tried to edit the function that sets the classifier so that it prints (either with print () or with thean .printing.Print / theano.pp ()), and all I get is a single print during model installation.

+4
source share
1 answer

classifier.cost - , , , . , classifier.cost, .

f_first_layer = theano.function([x], first_layer)

, . train_model. train_model , train_model , , train_model ( train_model - ).

+4

All Articles