본문 바로가기

Main

[review] Domain Adaptive Faster R-CNN for Object Detection in the Wild [review] Domain Adaprive Faster R-CNN for Object Detection in the Wild 들어가기 앞서 Paper URL : https://arxiv.org/pdf/1803.03243.pdf Paper Info : Yuhua Chen, Wen Li, Chistos Sakaridis, Dengxin Dai, Luc Van Gool (CVPR 2018) References http://jaejunyoo.blogspot.com/2017/01/domain-adversarial-training-of-neural.html : DANN 에 대하여 잘 설명해주신 사이트입니다.http://theonly1.tistory.com/301 : 마찬가지로 Domain adaptation 에 .. 더보기
[tendorflow]데이터셋 정규화(whitening)의 필요성 데이터셋 정규화(whitening)의 필요성 데이터셋의 값 분포를 0에 맞추는 정규화(whitening)를 하지 않을경우 데이터셋에 0인 부분들이 너무 많아서(희소) 많은 레이어들을 거쳐서 최종적인 output 값이 [[0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]]과 같이된다. (softmax를 거친경우) 그러나 정규화를 해주면[[0.00343778 0.02022134 0.0288361 0.09710948 0.08636719 0.21370631 0.43184397 0.1164527 0.0004596 0.00156549]] 과 같이 된다. 0의 결과는 cross entropy함수의 log 부분에서 nan을 발생시킬 위험이있고1의 결과는 학습이 안이루어지게끔한다. 따라서 softmax 전에 cro.. 더보기
[Tensorflow] relu 함수 직접 만들어보기 (미완) relu 활성화 함수 직접 구현하기relu는 sigmoid의 경사 감소 소실문제를 해겨하기위해 고안된 많은 방법중 일반적으로 가장 많이 사용되는 활성화 함수입니다.tensorflow에서 relu는 tf.nn.relu() 와 같이 기본 라이브러리로 구현되어있는것을 사용하여 간단하게 사용할 수 있습니다. 하지만 leakyRelu와 같이 변종 relu들이나 자신만의 활성화 함수를 사용해보고 싶을때가 있을 수도 있습니다.그래서 직접 구현해보려고 합니다. 1. Relurelu 함수식은 단순히 max(x,0) 이기 떄문에 매우 간단합니다. def myRelu(self,tensor): return tf.maximum(tensor,0) 2. LeakyReluLeakyRelu 함수식역시 단순히 max(x,ax) 이기 떄.. 더보기
구현 에러 정리 'NoneType' object is not iterable 코드: def get_trainset_asnumpy(self): if(type == 10 ): return dict[b'data'] , dict[b'labels'], dict[b'labels'] elif(type == 100): return dict[b'data'],dict[b'fine_labels'], dict[b'coarse_labels'] else: return None 에러: train_X , train_Y_, _ = dataset_maker.get_trainset_asnumpy() TypeError: 'NoneType' object is not iterable self.type 으로 썼어야 했는데 그냥 type으로 써서 생긴 문제였다... 더보기
[tensorplow, numpy, python] 구현시 자주 햇갈리는것들 정리 numpy - append와 concatenate 1. np.append( a, b) 또는 np.concatenate는 a와 b를 합친것을 a에 덮어씌우지않고 새로 합쳐진 결과를 반환한다. a= np.concatenate( (np.array([1,2,3,4]), np.array([5,6,7,8])), axis=0) print(np.append(a,[1,2,3,4])) a= np.append(a,[1,2,3,4]) print(a) [1 2 3 4 5 6 7 8] [1 2 3 4 5 6 7 8 1 2 3 4] 2. np.concatenate는 axis 필요. 기능적으로 append와 구분 3. np.append(a,b) 형식으로 사용하지 a.append(b)는 불가능 (리스트와는 다르다)4. np.appen.. 더보기
[tensorflow] mnist 데이터 reshape 하기 Numpy - reshape *numpy의 reshape 함수는 numpy 데이터의 shape를 변경하고 싶을때 유용한 함수입니다. *reshape는 원래 데이터를 변경하지않고 반환된 결과를 사용하는 방식으로 사용됩니다. *reshape의 인자 -1은 일단 해당 자리 부분의shape는 비워두고 다른 차원의 shape가 다 결정됬을경우 남은 부분만큼 알아서 shape를 결정하는것을 의미합니다. Implementation 코드:import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("./mnist/data/", one_hot=True) #print(mnis.. 더보기
[tensorflow] numpy to tf.constant 목적 : numpy 형식을 tensor 형식으로 numpy를 tf.const로 바꾸기 : tf.convert_to_tensor(X, np.float32) #X: numpy 형식또는tf.constant(X) numpy를 tf.Variable로 바꾸기 tf.Variable(X) 코드 : #============================================================import tensorflow as tf import numpy as np from sklearn import datasets mnist = datasets.fetch_mldata('MNIST original', data_home='.') X = mnist.data t = mnist.target sess = tf.S.. 더보기
[c] getchar(),getch(),getche()의 차이점을 알아보자(원문 링크) 원문 주소 : http://kcoder.tistory.com/entry/getchar-getch-getche%EC%9D%98-%EC%B0%A8%EC%9D%B4%EC%A0%90-%EC%98%88%EC%A0%9C%EC%86%8C%EC%8A%A4-%EA%B7%B8%EB%A6%BC ------------------------ 굉장히 좋은글이어서 저장용으로 원문 주소를 끌어왔다. 더보기
[c] 버퍼문제 1 출처 : http://kin.naver.com/qna/detail.nhn?d1id=1&dirId=1040101&docId=214854487&sp=2&sid=oTchTn5jxw%2BfacTCZPhItA%3D%3D&rank=1&pid=Sr3DVsoRR1lssvCCkTVsssssssd-268661&search_sort=0&qb=Y+yWuOyWtCDrsoTtjbzsnZgg7YGs6riw&spq=0&section=kin&enc=utf8 --------------------------------------------------------------------------------------- 질문 : #include int main() { int ch=0; int count=0; while(ch != EOF) { .. 더보기
[c] sizeof연산자를 근본적으로 알아보자(원문 링크) 원문 링크 : http://cafe.naver.com/haebop/5173 ------------------------------------- sizeof연산자가 어떤식으로 작동하는지 더 깊게 알수 있게해주는 좋은 글이어서 끌어와보았다. 더보기