↓폴밍끼 유튜브 채널 자세히보기

load 3

unet을 load_model 시 Unknown layer: GELU. Please ensure this object is passed to the `custom_objects` argument. 가 뜬다면 custom_objects 설정하세요

아래 두 코드처럼 load_model의 인자에 모델 경로 뿐만 아니라 custom_objects도 추가해줘야 합니다. from keras_unet_collection.activations import GELU from keras_unet_collection.losses import iou_seg # /media/visbic/MGTEC/water_seg/water_segmentation/unet_model/20211211-040154/10-0.9812.hdf5 model = keras.models.load_model('/water_segmentation/unet_model/20211211-040154/10-0.9812.hdf5', custom_objects={ "GELU":GELU, "iou_seg":io..

(해결방법) cannot import name 'get_config' from 'tensorflow.python.eager.context'

저 같은 경우도 텐서플로를 2.2.0에서 2.4.1로 업데이트 후 이런 에러가 떴었는데 아래 방법 참고해서 해결하였습니다. keras에서 load_model 하지 않고 아래 코드대로 load_model하니까 해결됐어요! 오 주여!!!! 감사합니다 ㅠㅠㅠ I had Tensorflow===2.2.0 and when I updated it to Tensorflow==2.4.0 this issue occurred. I think there is a conflict of keras.models.load_model and the base version of tensorflow you are using. Try running - import tensorflow as tf tf.keras.models.load_mod..

[펌] save, load_model 과 save_weights, load_weights의 차이점

https://ltlkodae.tistory.com/13 케라스(keras) 모델 저장(save) 및 불러오는(load) 2가지 방법 케라스 모델을 저장하고 불러오는 2가지 방법에 대해서 설명드리겠습니다. 모델 만들기 먼저 모델을 만들어야 겠죠? 7개 Layer 로 된 간단한 분류 모델을 만들었습니다. import tensorflow as tf from sklear ltlkodae.tistory.com