다양한 activation function python 으로 그리기
https://maelfabien.github.io/deeplearning/act/#
Activation Functions
Deep Learning with PyTorch
maelfabien.github.io
다양한 activation function python 으로 그리기
https://maelfabien.github.io/deeplearning/act/#
Activation Functions
Deep Learning with PyTorch
maelfabien.github.io
python3.8
1. 앞뒤 간격 한칸씩 주기
>>> import numpy as np
>>> x=np.arange(0,0.4,0.0008)
>>> np.savetxt('test.dat', x, fmt=' %.4f ')
>>> exit()
2. 앞뒤 특정 문자 채우기
>>> import numpy as np
>>> x=np.arange(0,0.4,0.0008)
>>> np.savetxt('test.dat', x, fmt='{:*^20}'.format('% .4f '))
>>> exit()
참고글
https://www.delftstack.com/ko/howto/numpy/python-save-and-load-numpy-array/
Python에서 NumPy 배열 저장 및로드
Python에서 NumPy 배열을 저장하고로드하는 3 가지 메서드, numpy.savetxt() 및 numpy.loadtxt() 함수, numpy.tofile() 및 numpy.fromfile() 함수, numpy.save() 및 numpy.load() 함수.
www.delftstack.com
https://docs.python.org/3/library/string.html#format-specification-mini-language
string — Common string operations — Python 3.9.6 documentation
string — Common string operations Source code: Lib/string.py String constants The constants defined in this module are: string.ascii_letters The concatenation of the ascii_lowercase and ascii_uppercase constants described below. This value is not locale-
docs.python.org
https://machinelearningmastery.com/command-line-recipes-deep-learning-amazon-web-services/
10 Command Line Recipes for Deep Learning on Amazon Web Services - Machine Learning Mastery
Running large deep learning processes on Amazon Web Services EC2 is a cheap and effective way to learn and develop […]
machinelearningmastery.com
참고한 글을 Amazon Web Services에서 딥러닝할때 사용할 수 있는 커맨드 라인에 대해서 소개하고 있지만
GPU 백그라운드 실행하는 방법은 개인 GPU머신에서 동일하게 사용해도 아무 문제 없다.
여기서 참고할만한 커맨드 라인은
4. Run Script on a Specific GPU on the Server 이다.
$ CUDA_VISIBLE_DEVICES=0 nohup python script.py > ./script.py.log </dev/null 2>&1 &
위의 경우에는 0번 GPU 사용하여 script.py 소스 코드를 실행하고 log를 동일한 디렉토리에 출력하는 경우이고
$ CUDA_VISIBLE_DEVICES=1 nohup python script.py > ./script.py.log &1 &
위의 경우에는 1번 GPU 사용하여 script.py 소스 코드를 실행하고 log를 동일한 디렉토리에 출력하는 경우이다.
링크되어있는 글들은 전반적으로 볼만하다.
물론 나는 저 커맨드 라인만 찾은거였지만...