언어30 [theano] why dose theano.function use 'givens' in theano? 원문 그대로 들고옴. Theano, 헷갈리는 shared variable 및 updates, givens 개념 May 12, 2015 Theano를 처음 익힐 때 조금 헷갈리는 부분이 shared variable, 그리고 updates, givens 문법인데, 이런 문법이 굳이 왜 필요한지 의문이 들기 때문이다. 여기 링크에 설명이 잘 돼있긴 하지만 좀 더 정리해본다. 예제 설명을 위한 예제로 Ordinary Least Square 문제 (Linear Regression) 또는 Vector Form으로 나타내면 를 생각해보자. 사실 이 문제는 Analytic Solution이 존재하지만 여기서는 예시를 위해 Gradient Descent Learning을 하는 것으로 생각한다. 우선 Theano가 권장하.. 2016. 1. 25. [python] How to get matlab data file '.mat' in python 우선 matlab 에서 .mat 데이터를 생성해보자. Frstly, we generate matlab data format file '.mat' in matlab 두번째로 python에서 이 데이터를 받는다. 이때, scipy.io 함수를 이용하여 .mat 파일을 받을 수 있다. Secondly, we get this data in python. At the point, we use 'scipy.io' library in python. 위의 코드를 실행하면 .mat data를 받아서 train_set_x 에 해당하는 data를 print하게 된다. train_set_x 데이터는 (3,10)행렬로 이뤄진 랜덤수 행렬이다. If thee top code implement in python, we get .m.. 2016. 1. 25. [theano] what is dimshuffle and how to use? # build symbolic expression to add bias and apply activation function, i.e. produce neural net layer output # A few words on ``dimshuffle`` : # ``dimshuffle`` is a powerful tool in reshaping a tensor; # what it allows you to do is to shuffle dimension around # but also to insert new ones along which the tensor will be # broadcastable; # dimshuffle('x', 2, 'x', 0, 1) # This will work on 3d tensor.. 2016. 1. 21. [pyton] numpy.cmd numpy.prod : product(곱하기) >>>numpy.prod([5, 2]) 10 numpy.zeros : generating zero array >>>numpy.zeros((3,2)) array([[0., 0.], [0., 0.], [0., 0.]]) 2016. 1. 21. 이전 1 2 3 4 5 6 7 8 다음