에러가 나오는 원인

get_config라는 함수가 없기때문.

callback 함수를 사용해 모델을 저장하려하는데 위 에러 발생

callback 함수를 사용하지 않고 model.fit을 하는 경우에는 위 에러가 발생하지 않는다.

 

해결 방법

model class 내에 get_config라는 함수를 만들어 주면 된다.

def get_config(self):
    config=super().get_config().copy()
    return config

 

참고URL:stackoverflow.com/questions/58678836/notimplementederror-layers-with-arguments-in-init-must-override-get-conf

OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see

 

파이참에서는 다음과 같은 에러코드가 나오지만 jupyternotebook에서는 오류가 나오지않는다.

단순 shutdown....

그러므로 이를 확인하기 위해서는

 

jupyter notebook --debug

위와 같이 debug옵션을 주어 실행하면 문제점 확인가능.

 

해결법은 간단하다.

 

import os

os.environ['KMP_DUPLICATE_LIB_OK']='True'

 

혹은,

>conda install nomkl

작성해주자.

 

 

 

[출처]fredriccliver.medium.com/%EC%97%90%EB%9F%AC-omp-error-15-initializing-libiomp5-dylib-but-found-libiomp5-dylib-already-initialized-2bcc0033dc83

+ Recent posts