https://icim.nims.re.kr/post/easyMath/70 알기 쉬운 산업수학 알기 쉬운 산업수학 Gradient Descent Optimizer 2017년 12월 13일(수) | 김민중 URL (1) 주어진 목적함수 f f 의 최솟값(minimum)을 찾아가는 알고리즘으로 다음과 같은 방식으로 최솟값을 찾아간다. 초기값 x 0 x 0 을 임의로 설정, 적당한 Learning rate α α 설정 n ≥ 0 n ≥ 0 인 정수에 대해서 x n + 1 x n + 1 은 다음과 같이 정의한다. x n + 1 : = x n − α ⋅ ∇ f ( x n ) x n + 1 := x n − α ⋅ ∇ f ( x n ) 주의사항 함수 f f 의 모양이 convex가 아닌 경우 global minimum이 아닌 local minimum으로 x n x n 이 수렴할 가능성이 있다. Learning rate α α 값이 큰 경우 최솟값으로 x n x n 이 수렴하는 것이 아니라 발산할 수 있다. Learning rate α α 값이 작은 경우 수렴하는 속도가 지나치게 느릴 수 있다. 방정식 2 ⋅ x = 10 2 ⋅ x = 10 의 근을 Gradient Descent를 이용해서 찾아보자. 목적함수 f ( x ) : = ( 10 − 2 x ) 2 f ( x ) := ( 10 − 2 x ) 2 으로 설정하겠다( f f 의 최솟값인 0이 되게 하는 x x 값이 우리가 원하는 방정식의 근이다). 초기값 x 0 = 0 x 0 = 0 , Learning rate α = 0.05 α = 0.05 으로 설정 f ′ ( x ) = 4 ( 2 x − 10 ) f ′ ( x ) = 4 ( 2 x − 10 )...
공유 링크 만들기
Facebook
X
Pinterest
이메일
기타 앱
[Anaconda][Python][Visual Studio] How to add virtual environment to visual studio python project.
공유 링크 만들기
Facebook
X
Pinterest
이메일
기타 앱
<How to add virtual environment to visual studio python project>
1. Create virtual env
There are several way to make python virtual environment.
1-1. anaconda UI
2. After creating a python project, View -> Other windows -> python environments
3. Apply a virtual environment from already exist ( in this example from anaconda )
3-2. Follow like the sequence number on picture. ( 1 -> 2 -> 3 -> 4 -> 5 )
<For example in my case>
-> + Custom... -> fill in description -> click ... line of prefix path
-> select a virtual envrionment ( In this example, select from anaconda : c:\users\username\anaconda3\envs\thisisvirtualenvname )
-> auto detect -> apply
4. From solution exporer, right click and select add/remove python environments...
now you can see a dialog box and choose one from the virtual environment list on the dialog box.
save and close project.
5. Create a command environment, you can copy one and modify it.
5-1. copy a command environment from "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts" ( This is my case , you might installed another version or installed to another path )
5-2. Right click on the file and select property and modify or you can use it as it is.
1. How to copy exist virtualenv to new one. 2. from old pip freeze > requirements . txt mkvirtualenv ksgdl workon ksgdl pip install - r requirements . txt 3. reference https://stackoverflow.com/questions/7438681/duplicate-virtualenv https://www.blogger.com/blogger.g?blogID=8309050393695147092#editor/target=post;postID=3005304059966869533;onPublishedMenu=allposts;onClosedMenu=allposts;postNum=21;src=postname
1. Install pip, virtualenv , virtualenvwrapper for separate python environments $ wget https://bootstrap.pypa.io/get-pip.py $ sudo python get-pip.py $ sudo pip install virtualenv virtualenvwrapper $ sudo rm -rf get-pip.py ~/.cache/pip 2. Update .bashrc file # virtualenv and virtualenvwrapper export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh 3. Make workplace with virtual environment $ source ~/.bashrc $ mkvirtualenv deepLab ( deepLab is name , it means you can name it , after this command run prompt of terminal will change. )
댓글
댓글 쓰기