Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TF Dev Certificate Error] 가상머신에서 시험 환경 학습 중 발생한 에러 해결하기 #23

Closed
RyanKor opened this issue Sep 14, 2021 · 0 comments
Assignees
Labels
bug Something isn't working Certificate GCP Professional Data Engineer documentation Improvements or additions to documentation Mission Google ML Bootcamp Mission

Comments

@RyanKor
Copy link
Owner

RyanKor commented Sep 14, 2021

에러 개요

OOM when allocating tensor with shape[128,16,298,298] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
	 [[node sequential/conv2d/Relu (defined at <ipython-input-18-b47e4cb674de>:1) ]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

image

에러 원인

가상 머신 또는 로컬 컴퓨터에서 사용하고 있는 GPU 메모리를 거의 다 사용하고 있는 상황에 새로운 학습을 진행하게 되었을 때 발생한 에러다.

가상머신이 알아서 놀고 있는 GPU에 자동으로 할당해주면 좋겠는데, 아직 주피터 노트북에서 이러한 기능까지 제공하고 있는 것 같지는 않다.

현재 작업 중인 프로젝트가 학습한 이미지를 토대로 이미지를 생성하는 작업이다 (keras의 ImageGenerator 인스턴스 사용 중)

코세라로 사용할 땐 큰 문제가 없었는데, 아마 Backend.AI에서 생성한 가상머신 용량이 작아서 발생한 것으로 보인다.

(현재 사용 중인 Backend.AI에서 생성한 가상 머신의 에러로 보이지는 않는다)

해결법

기존에 사용하던 주피터 노트북을 다운로드 받고, 가상 머신의 GPU 용량을 키워 코드를 다시 돌려보니 작동한다.

아마 이미지 생성하는 작업이 생각보다 GPU 리소스를 많이 사용하다보니 발생한 에러로 보인다.

(그럼 GPU 없는 노트북의 로컬 환경에서 안돌아가겠는데? Colab도 GPU 리소스가 적은 무료 버전에서 에러가 발생할 수도 있겠다..?)

@RyanKor RyanKor self-assigned this Sep 14, 2021
@RyanKor RyanKor added bug Something isn't working documentation Improvements or additions to documentation Certificate GCP Professional Data Engineer Mission Google ML Bootcamp Mission labels Sep 14, 2021
@RyanKor RyanKor closed this as completed Sep 14, 2021
@RyanKor RyanKor added this to Done in ML Bootcamp Schedule Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Certificate GCP Professional Data Engineer documentation Improvements or additions to documentation Mission Google ML Bootcamp Mission
Development

No branches or pull requests

1 participant