일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- 생산성
- 수치해석
- teps
- 우분투
- IEEE
- 인공지능
- Linear algebra
- Dear abby
- JAX
- 에러기록
- matplotlib
- Statics
- 옵시디언
- obsidian
- MATLAB
- pytorch
- Julia
- ChatGPT
- Zotero
- 텝스
- LaTeX
- 텝스공부
- 딥러닝
- 논문작성법
- Numerical Analysis
- WOX
- Python
- 수식삽입
- 논문작성
- 고체역학
- Today
- Total
목록분류 전체보기 (430)
뛰는 놈 위에 나는 공대생
빠르게 윈도우에서 검색을 위한 툴은 다음과 같다. 1. Everything 윈도우에서 검색을 해주는 툴이다. 폴더에서 윈도우 검색하는데 폴더에 검색하면 너무 느려서 everything을 이용해서 빠른 검색을 할 수 있도록 하였다. everything은 다음 링크에서 다운받아 설치할 수 있다. 다음과 같이 파일을 검색하는데 검색 속도가 일반 윈도우 폴더 검색보다 훨씬 빠르다. 2. WOX WOX는 여러가지 윈도우 어플리케이션을 쉽게 접근해서 사용할 수 있도록 하는 프로그램이다. 사용자가 지정한 단축키를 누르면 다음과 같이 화면에서 어플을 검색해서 실행할 수 있다. 3. 결합하기 위의 everything과 WOX를 함께 쓰면 WOX를 통해 everything에서 검색을 하는 것과 같은 동일한 효과를 얻을 수..
matplotlib에서 3D scatter plot을 그리는 방법 3D plot을 그리기 위한 코드는 여러 방식이 있을 텐데 아래 방식이 가장 스탠다드인 것 같아서 이렇게 사용한다. max_value = np.amax( np.abs(data) ) # max값으로 축 제한 fig = plt.figure(constrained_layout=True) ax = fig.add_subplot(projection='3d') ax.scatter(data[:,0], data[:,1], data[:,2], marker='o', color ='r', alpha=1.0) ax.set_xlim([-max_value, max_value]) ax.set_ylim([-max_value, max_value]) ax.set_zlim([..
데이터 결과를 보고나서 이를 저장하기 위해 일일이 옮겨적지 않고 dataframe으로 만든 다음에 csv로 export하는 방법이 훨씬 편하다. 간단하게 표현하면 아래와 같은 코드를 사용한다. result_name = (어쩌구저쩌구) filename = result_folder + result_name + '.csv' write_csv = pd.DataFrame( record_matrix ) # data_frame 생성 # 또는 write_csv = pd.DataFrame( record_matrix, columns = ['A','B','C'] ) write_csv.to_csv(filename) dataframe을 사용하면 그 dataframe에서의 데이터를 종합하여 보여주는 기능이 있다. result_m..
JAX를 쓰다가 너무 많은 양의 데이터를 쓰다보니 메모리 부족(OOM: Out of memory) 현상을 겪었다. 근본적인 해결책은 달리 없다. 데이터가 너무 많아서 생기는 문제이니 데이터 양을 줄이던가 아니면 병렬 컴퓨팅을 하는 방법이 있다. 병렬 컴퓨팅을 간단한 코드에서는 실행해보았는데 큰 네트워크에서는 해본 적이 없다. 일단 임시방편으로는 다음과 같다. 메모리 부족이 쉽게 발생할 수 있는 이유는 JAX에서 처음에 import를 할 때 대부분의 메모리를 미리 할당해놓기 때문이다. 따라서 이 preallocation을 막거나 줄이면 도움이 된다. 1. Preallocation 중단 XLA_PYTHON_CLIENT_PREALLOCATE=false # 구체적으로는 다음과 같이 구현한다. import os ..
텍스트 안에서 로마 숫자를 쓰고 싶은데 방법이 마땅치가 않았다. 지금까지 찾은 방법으로는 다음 방법이 있다. 1. \usepackage{romannum} 명령으로 import해서 사용 이렇게 하면 \romanum{숫자} (소문자) 또는 \Romannum{숫자}를 이용해서 로마 숫자를 쓸 수 있다. 그러나 이렇게 할 때 페이지 숫자가 로마자로 출력되는 문제가 발생한다. \usepackage{romannum} \AtBeginDocument{\pagenumbering{arabic}} 따라서 위의 두 번째 줄 코드와 같이 페이지 숫자를 아라비아 숫자로 정해주는 코드를 넣어야 한다. 숫자를 쓸 때는 \Romannum{(숫자)} (대문자) , \romannum{(숫자)} 이렇게 해주면 된다. 여기서 숫자는 정수가 ..
zotero를 쓰다가 내가 원하는 citation key를 등록하고 싶어서 작성하는 글이다. 보통은 zotero가 지정해놓은 양식대로 출력되거나, 나의 경우에는 better BibTeX를 쓰고 있어서 그쪽에서 이미 정해진 양식대로 ciation key가 export된다. 대신 다음과 같이 논문을 클릭하고 추가사항에 [Citation Key: (원하는 key 이름)]을 추가해놓으면 다음과 같이 citation key가 고정된 것을 확인할 수 있다.
이번에 리눅스 환경에서 CUDA, cuDNN을 설치하면서 있었던 시행착오를 기록하는 글이다. 기본적으로 Linux 환경에서 설치하는 방법은 매뉴얼에 잘 나와있어서 이 링크를 참고하면 되기는 하는데 디테일하게는 고민할 부분들이 있다. 이 글에서 주의할 점은 1) 나는 이미 CUDA, cuDNN을 다른 사람이 설치해놓은 버전이 있었다. (그 버전들은 root에 설치되어 있었다.) 2) 추가적으로 CUDA 다른 버전을 쓰고 싶어서 설치하기 시작했다. 3) 우분투 user 중에 나의 계정이 있지만 내 계정에 local하게 설치하는 것이 아니라 모든 유저가 쓸 수 있도록 설치하였다. 나만 쓰고 싶으면 내 home directory에서 시작되는 경로에 설치하면 된다. 공용 서버컴의 경우에는 root 계정에 이미 설..
JAX에서 사용 가능한 device를 찾는 방법은 다음과 같다. import jax jax.devices() >> [GpuDevice(id=0, process_index=0), GpuDevice(id=1, process_index=0), GpuDevice(id=2, process_index=0), GpuDevice(id=3, process_index=0)] 여기에서는 device가 4개이기 때문에 하나를 지정해서 쓰고 싶을 수 있다. 방법을 찾아보니 document에서는 jax.default_device = jax.devices("gpu")[2] # default로 세번째 gpu를 쓰고 싶은 경우 다음과 같이 쓰면 된다고 했지만 실제로는 적용이 되지 않았다. 좀 더 확실한 방법으로는, JAX를 impor..
이 글은 JAX 버전 맞추느라 여러 🐶고생한 경험을 바탕으로 작성하였다. 0. 요구 버전에 대한 이해 JAX는 설치할 때 요구하는 버전이 있다. 개별 gpu에 따라도 달라져서 까다롭긴한데 JAX currently ships three CUDA wheel variants: CUDA 12.0 and CuDNN 8.8. CUDA 11.8 and CuDNN 8.6. CUDA 11.4 and CuDNN 8.2. This wheel is deprecated and will be discontinued with jax 0.4.8. 위의 세 버전이 가능하다고 하는데, 이는 최신 JAX 버전(230412 기준)에 따른 것이다. CUDA 11.4라고 적혀있는 경우에는 11.4 이상이면서 CuDNN 8.2 이상이면 된다. ..
0. Intro oh-my-zsh를 설치했다. 우분투에서 oh-my-zsh를 설치하는 방법은 다른 글(링크1, 링크2)에서 잘 나와있어서 그 글을 참고하면 될 것 같다. 여기서 다루고자 하는 것은 powerlevel10k 테마를 우분투에서 사용하는 법이다. 왜냐하면 이전에 본 글에서는 글쓴이가 mac을 사용하기 때문에 설치과정에서 적용한 터미널의 특성 상 테마를 적용하더라도 심볼이 깨지지 않았지만, 필자는 우분투를 쓰기 때문에 설치 과정에서 심볼이 깨지는 현상이 발생되었기 때문이다. 사람들이 많이 쓰는 테마인 agonster 테마 말고 더 예쁜(!) 테마를 쓰고 싶었다. powerlevel10k 테마를 적용하고 옵션을 symbol 활성화로 해놓으면 다음과 같다. 다음과 같이 예쁘게 심볼도 있는 터미널을 ..