Created
July 18, 2015 07:38
-
-
Save xiangze/8ce34d1adcf26b64e32d to your computer and use it in GitHub Desktop.
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 tensor as T | |
from theano import function, shared | |
import numpy | |
X = shared(numpy.array([0,1,2,3,4])) | |
Y = T.vector() | |
#X_update = (X, T.set_subtensor(X[2:4], Y)) | |
X_update = (X, T.set_subtensor(X[:], Y)) | |
#X_update = (X, Y) | |
f = function([Y], updates=[X_update]) | |
#f([100,10]) | |
f([0,1,100,10,4]) | |
print X.get_value() # [0 1 100 10 4] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment