전체 글 36

Tensorflow: input_tensor와 input_shape의 차이

tf.keras.applications.InceptionV3( include_top=True, weights="imagenet", input_tensor=None, input_shape=None, pooling=None, classes=1000, classifier_activation="softmax", ) input_shape: 입력받는 이미지의 shape input_tensor: 입력층의 tensor 지정. 입력받는 이미지의 shape에 관계없이 특정 tensor로 지정할수 있음. 공식문서: input_shape will be ignored if the input_tensor is provided 예를 들어, input_shape를 (224, 224, 3)으로 하고 input_tensor을 지정하지 ..

Tensorflow 2020.10.28

파이썬과 C++ 문법 차이 - 함수

함수 void hello(){ cout y) return x; else return y; } // 인라인 함수 inline int max(int x, int y){if(x > y) return x; else return y;} 함수 프로토타입 선언 #include using namespace std; // max 함수 선언; 함수 프로토타입 선언부. // 프로토타입이 선언되어 있으면, max 함수가 main 함수 뒤에 있어도 실행가능함. int max(int x, int y); int main() { int num1, num2, ans; ans = max(num1, num2); cout y) return x; else return y; } 기본 인수 사용하기 #include using namespace ..

Tensorflow Error 해결: Could not load 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found

Window 10 CUDA 10.1 환경에서, tensorflow == 2.3.1를 설치한 후, Could not load dynamic library 'cudnn64_7.dll', dlerror: cudnn64_7.dll not found 에러가 발생하여, GPU가 잡히지 않는 에러가 발생한 경우 해결방법입니다. CUDA 설치 경로에 들어가보면, (제 경우, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin (각자 설치한 경로로 들어가면 됩니다.)) cudnn64_7.dll이 cudnn64_8.dll 로 되어 있음을 확인할 수 있다. cuDNN ..

Error 2020.10.27

텐서플로우 콜백 함수(tensorflow callback)

https://keras.io/api/callbacks/ Keras documentation: Callbacks API Callbacks API A callback is an object that can perform actions at various stages of training (e.g. at the start or end of an epoch, before or after a single batch, etc). You can use callbacks to: Write TensorBoard logs after every batch of training to moni keras.io 콜백함수가 필요한 이유: 모델이 학습을 시작하면 학습이 완료될 때까지 사람이 할 수 있는게 없습니다. 따라서 이를 해..

Tensorflow 2020.05.16