Last active
June 22, 2018 12:09
-
-
Save RenSys/fe366553685666ddc4099c384e1714a6 to your computer and use it in GitHub Desktop.
Theano - Multiple Outputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from theano import function | |
from theano import tensor as T | |
# (theano Tutorial)[http://deeplearning.net/software/theano/tutorial/examples.html] | |
# create a symbolic matrix | |
x, y = T.dmatrices('x', 'y') | |
diff_output = x - y | |
abs_diff_output = abs(diff_output) | |
diff_squared_output = diff_output**2 | |
# symbolic function | |
f = function([x, y], | |
[diff_output, abs_diff_output, diff_squared_output]) | |
print f([[1, 1], [1, 1]], | |
[[0, 1], [2, 3]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment