Cogdof / 2019_Capstone-design

Capstone design
0 stars 0 forks source link

Build Model structure #4

Open Cogdof opened 4 years ago

Cogdof commented 4 years ago

Build Model structure

Cogdof commented 4 years ago

ResourceExhaustedError: OOM when allocating tensor with shape 관련 error 해결법

https://github.com/tensorflow/tensorflow/issues/14724 https://github.com/tensorflow/models/issues/3393 https://github.com/tensorflow/tensorflow/issues/136

이 세 곳의 github에서 error점에 대한 이야기가 오갔고 이에 대한 해결법을 간결하게 요약하여 설명하자면

해결법 1. 모든 내용에 대한 것을 저장한 후 jupyter notebook을 다시 시작한다.

해결법 2. 말그대로 Memory 자원의 부족으로 생긴 문제이기 때문에 batch_size을 줄여준다. 일반적으로 batch_size는 2n에 해당하는 양만큼이니 지수를 하나 줄여보는 것이 어떤가에 대한 제시를 한다.

해결법 3. 다른 GPU Memory 사용에 대한 소스를 없앤다. 더 쉽게 설명하자면 사용하는 프로그램 이외에 다 종료해서 Memory 사용을 줄이라는 말이다.

Cogdof commented 4 years ago

Model '1029_79%.h5' result

image

1029_2_accuracy 1029_2

Result : Need to Boost model's classification performance.

Case 1, Add models's layer. Case 2, Get additional data set to train.

@KangSinWon

Cogdof commented 4 years ago

Model '1030_5layer_200step_100epoch.h5' result

image 1030_5layer_200step_100epoch 1030_5layer_200step_100epoch_acc

Result : Case 1, Add models's layer. <- Train faster then before.

Next to do : Case 2, Get additional data set to train.

@KangSinWon

Cogdof commented 4 years ago

Model ' v1.54.h5 ' result

Train 636000 images Valid 53000 Test 10600 Classification 106 labels,

image

v1 54_acc v1 54_loss

Cogdof commented 4 years ago

Performance boost

Reduce feature vector

  1. make channel RGB ->1 channel.
  2. resize 255,255 -> 48,48 or more smaller size.

Refer to the model written in the paper http://cs229.stanford.edu/proj2018/report/98.pdf https://uu.diva-portal.org/smash/get/diva2:1218490/FULLTEXT01.pdf http://openaccess.thecvf.com/content_CVPR_2019/papers/Dey_Doodle_to_Search_Practical_Zero-Shot_Sketch-Based_Image_Retrieval_CVPR_2019_paper.pdf

Cogdof commented 4 years ago

Model ' v2.00.h5 ' result

Classification 8 labels,

image v2 00_acc v2 00_loss

Cogdof commented 4 years ago

Model result

Train 1300000 images : each label has 13000 images Valid 1000000 Test 1000000 Classification 100 labels, <- separate confuse labels

' v2.02.h5 '

v2 02_summary v2 02_acc v2 02_loss


' v2.15.h5 '

v2 15_summary

v2 15_acc v2 15_loss