dev
-
(caffe) faster R-CNNdev 2016. 10. 6. 20:30
proposal_layer.py에서 min_size error. bbox 덤프 떠보면 전부 NaN임.-> 학습하다 exploded 된 것으로 보임. 해결방법 : NaN일 때 해결은? lr 다운 /faster-rcnn-py/tools/../lib/fast_rcnn/bbox_transform.py:50: RuntimeWarning: overflow encountered in exp pred_h = np.exp(dh) * heights[:, np.newaxis] faster-rcnn-py/tools/../lib/rpn/proposal_layer.py:176: RuntimeWarning: invalid value encountered in greater_equal keep = np.where((ws >= min..
-
(python) function을 파라메터로 받기dev 2016. 8. 24. 19:11
def add(x1, x2): return x1 + x2 def sub(x1, x2): return x1 - x2 def call(function, *args, **kwargs): val = function(*args, **kwargs) print val >>> call(add, 1, 2)3>>> call(sub, 1, 2)-1 ref. http://jhproject.tistory.com/109# type args args = (3, ) + args# type kwargs ex 2. >>> def call(param1, param2, function, *args, **kwargs):... print 'param1', param1... print 'param2', param2... new_args = (p..
-
-
[python] 파이썬에서 시스템 변수 참조하기dev 2014. 12. 3. 18:26
파이썬에서 시스템 변수(환경변수) 참조하려면 >> import os >> os.environ['환경변수 이름'] # 없는 값이면 'KeyError' 발생 >> os.environ.get('환경변수 이름' ) # 없는 값이면 'None' 리턴 >> os.getenv('환경변수 이름' , default_value) # 없는 값이면 default_value 리턴 example) >> import os >> print os.environ['HOME']
-
[python] shell command 실행하기dev 2014. 10. 15. 14:27
python 코드에서 shell script 실행하는 가장 간단한 방법>>> import os>>> os.system("command to execute") example>>> import os>>> os.system("ls -a") 좀더 복잡한 방법using subprocessref this link)http://stackoverflow.com/questions/4760215/running-shell-command-from-python-and-capturing-the-output example>> import subprocess>> commandStr = "nvidia-smi">> result = subprocess.check_output(commandStr, shell=True)