Coder Social home page Coder Social logo

keraspp's Introduction

KERASPP

코딩셰프의 3분 딥러닝, 케라스맛

Keras 코드로 맛보는 ANN, DNN, CNN, RNN, AE, GAN, UNET

케라스 코드로 맛보는 딥러닝 핵심 개념!

간결하고 직관적인 인공신경망 API를 제공하는 케라스는 구글 텐서플로, 마이크로소프트 CNTK, 아마존 MXNET, OpenCL PlaidML, 시애노 등의 딥러닝 엔진에서 지원하는 인기 인공지능 툴입니다. 이 코드들은 딥러닝 인공신경망 구현에 케라스를 사용합니다. 케라스로 주요 인공신경망인 ANN, DNN, CNN, RNN, AE, GAN, UNET을 구현하는 방법을 알아봅니다. 따라서 인공지능과 딥러닝 인공신경망의 구현에 관심이 있는 누구나 이 코드의 사용자입니다.

3분 딥러닝 케라스맛

구성

케라스를 이용해 딥러닝 인공신경망을 만들어 인공지능을 구현합니다. 1장은 케라스를 시작하는 데 필요한 기초를 다룹니다. 2장부터는 최신 인공지능 구현 방법인 주요 인공신경망을 예제로 이용해 다룹니다. 2장~5장에서 다루는 ANN, DNN, CNN, RNN은 지도학습 방식의 인공지능입니다. 6장과 7장에서 다루는 AE와 GAN은 비지도학습 방식이고 8장의 UNET은 고급 지도학습 방법입니다. 9장은 8장까지 배운 내용을 응용하고 확장하는 방법을 다룹니다.

예제는 쉽게 인공지능 구현 방법을 익히고, 추후 실무에 쉽게 재사용할 수 있게 하는 데 주안점을 두어 작성했습니다.

0장. 프롤로그

인공지능과 딥러닝 인공신경망의 개요를 알아봅니다. 그리고 인공신경망을 구현하는 케라스를 간단히 소개합니다.

1장. 케라스 시작하기

케라스는 인공지능을 파이썬으로 구현하는 라이브러리입니다. 케라스를 설치하는 방법과 간단한 인공신경망을 구현하는 예제를 다룹니다.

2장. 케라스로 구현하는 ANN(인공신경망)

ANN(artificial neural network)은 두뇌의 신경망을 흉내 낸 인공지능 기술입니다. ANN은 입력 계층, 은닉 계층, 출력 계층으로 구성되어 있습니다. 초기에는 기술적인 한계로 은닉 계층을 한 개만 포함하여 주로 총 3개 계층으로 ANN을 구성했습니다. 이 장에서는 ANN 구성에 필요한 요소를 이해하고 예제를 살펴보며 ANN 구현 방법을 익힙니다.

3장. 케라스로 구현하는 DNN(심층신경망)

DNN(deep neural network)은 은닉 계층을 여러 개 쌓아서 만든 인공신경망입니다. 다수의 은닉 계층을 이용하는 DNN은 ANN에 비해 더 우수한 성능을 내며 적용 분야도 다양합니다. 이 장에서는 DNN의 구성에 필요한 요소를 이해하고 케라스로 구현하는 방법을 익힙니다.

4장. 케라스로 구현하는 CNN(합성곱신경망)

CNN(convolutional neural network)은 영상 처리에 많이 활용되는 합성곱(convolution)을 이용하는 신경망 기술입니다. 합성곱에 사용되는 필터들은 학습을 통해 이미지 내의 특징점들을 자동으로 추출해냅니다. CNN은 이런 과정을 통해 기존에 수작업으로 찾던 특징점을 스스로 찾게 됩니다. 이 장에서는 CNN의 원리를 이해하고 케라스로 구현하는 방법을 알아봅니다.

5장. 케라스로 구현하는 RNN(순환신경망)

RNN(recurrent neural network)은 계층의 출력이 순환하는 인공신경망입니다. 재귀를 이용해 자기 계층의 출력 정보를 입력 신호로 다시 사용해 신경망의 성능을 높입니다. 특히 문자열, 음성 등 시계열 정보의 예측에 많이 활용됩니다. 이 장에서는 RNN의 기본 개념을 이해하고 예제를 구현해봅니다.

6장. 케라스로 구현하는 AE(오토인코더)

AE(autoencoder)는 비지도학습 인공신경망입니다. 비지도학습은 레이블 정보가 없는 데이터의 특성을 분석하거나 추출하는 데 사용됩니다. 비지도학습의 대표적인 방식인 AE의 목적은 입력 데이터의 특징점을 효율적으로 찾는 겁니다. 이 장에서는 AE의 원리를 이해하고 케라스로 구현하는 방법을 익힙니다.

7장. 케라스로 구현하는 GAN(생성적 적대 신경망)

GAN(generative adversarial network)은 경쟁을 통한 최적화를 수행하는 생성적 인공신경망입니다. GAN 내부의 두 인공신경망이 상호 경쟁하면서 학습을 진행합니다. 두 신경망 중의 하나는 생성망이고 다른 하나는 판별망입니다. 이 장에서는 GAN의 개념을 소개하고 케라스로 구현하는 방법을 다룹니다.

8장. 케라스로 구현하는 UNET(유넷)

UNET(U-shaped network)은 저차원과 고차원 정보를 모두 사용하여 이미지의 경계를 비롯한 특징을 추출하는 인공신경망입니다. 차원 정보만 이용해 고차원으로 복원해나가는 AE와 달리 고차원 특징점도 함께 이용해 디코딩을 진행해 이미지의 특징 추출에 용이합니다. 이 장에서는 UNET의 개념을 이해하고 구현 방법을 익힙니다.

9장. 케라스 응용

케라스를 이용하여 실제 문제에 인공지능을 활용할 때 생기는 문제를 효율적으로 처리하는 고급 기능을 다룹니다. 종종 학습에 필요한 데이터가 충분하지 못한 경우가 있습니다. 이런 경우는 학습 데이터 수를 늘려주거나 기존에 학습된 인공신경망을 재활용해야 합니다. 이 장에서는 인공지능 기술의 실전 활용을 위해 필요한 이미지 늘리기와 기존 망 재사용하기 방법을 익힙니다.

참고 자료

케라스 시작하기

[1] 추형석, 「인공지능의 역사와 성공요인」, 월간SW중심사회, 2016.12., https://spri.kr/posts/view/21643?code=inderstry_trend (2017. 12. 4)

[2] NVIDIA KOREA, 「인공지능(AI)은 어떻게 발달해왔는가」, 인공지능의 역사, 2016. 3. 13, http://blogs.nvidia.co.kr/2016/03/13/history_of_ai/ (2017. 12. 4)

[3] 「NVIDIA KOREA, 인공지능과 머쉰러닝, 딥러닝의 차이점을 알아보자, 2016. 8. 3, http://blogs.nvidia.co.kr/2016/08/03/difference_ai_learning_machinelearning/ (2017. 12. 4)

[4] 삼성전자, “[핫테크 3분 클래스] 딥러닝 편”, YouTube, 2016. 10. 16, https://www.youtube.com/watch?v=3jCaGDIY6VM (2017. 12. 4)

[5] Vertex.ai, “PlaidML 소개: 모든 플랫폼을 위한 오픈소스 딥러닝 (Announcing PlaidML: Open Source Deep Learning for Every Platform)”, 2017. 10. 20, http://vertex.ai/blog/announcing-plaidml (2017. 12. 4)

[6] '인텔의 신무기' 너바나 창업자 "AI 시대 CPU·GPU·메모리는 결국 통합된다", 조선비즈, 2017. 5. 16, http://biz.chosun.com/site/data/html_dir/2017/05/16/2017051602248.html

[7] “애플, AI 칩 ‘뉴런 엔진’ 개발…생태계 확장”, ZDNET Korea, 2017. 5. 28, http://www.zdnet.co.kr/news/news_view.asp?artice_id=20170528102955

[8] Keras Documentation, “Keras: The Python Deep Learning library “, https://keras.io/ (2017. 12. 4)

[9] DWFOX, “Python Windows 개발 환경 구성 - anaconda python 설치”, http://dwfox.tistory.com/67 (2017. 12. 12)

[10] Jaeseung Lee, Jupyter Notebook 설치/사용방법, 2016. 5. 25, https://m.blog.naver.com/PostView.nhn?blogId=jaeseung172&logNo=220719131067&proxyReferer=https%3A%2F%2Fwww.google.com%2F (2017. 12. 12)

케라스로 구현하는 ANN

[1] Schmidhuber, J. (2015). "Deep Learning in Neural Networks: An Overview". Neural Networks. 61: 85–117. arXiv:1404.7828 . doi:10.1016/j.neunet.2014.09.003. PMID 25462637.

[2] 데이터 사이언스 스쿨, “신경망 성능개선", https://datascienceschool.net/view-notebook/f18248a467e94c6483783afc93d08af9/ (2017. 12. 2)

케라스로 구현하는 DNN

[1] LeCun, Yann; Bengio, Yoshua; Hinton, Geoffrey (2015). "Deep learning". Nature. 521 (7553): 436–444. Bibcode:2015Natur.521..436L. doi:10.1038/nature14539. PMID 26017442.

[2] Wizard's Note, “딥러닝 단어사전”, http://wizardsnote.tumblr.com/post/138818343004/딥러닝-단어사전-뉴럴넷-구조-1 (2017. 12. 2)

케라스로 구현하는 CNN

[1] LeCun, Yann. "LeNet-5, convolutional neural networks". Retrieved 16 November 2013.

[2] Github.io, “CS231n: Convolutional Neural Networks for Visual Recognition”, http://cs231n.github.io (2017. 12. 2)

케라스로 구현하는 RNN

[1] Deeplearning4j (DL4J), 초보자를 위한 RNNs과 LSTM 가이드, https://deeplearning4j.org/kr/lstm

[2] 김병희, 순환신경망(Recurrent neural networks) 개요, slideshare.net, 2017. 3. 22, https://www.slideshare.net/ByoungHeeKim1/recurrent-neural-networks-73629152

케라스로 구현하는 AE

[1] The Keras Blog, Building Autoencoders in Keras, 2016. 5. 14, https://blog.keras.io/building-autoencoders-in-keras.html (2017. 12. 4)

[2] 정병기, Image denoising with Autoencoder in Keras, 2017. 3. 3, https://byeongkijeong.github.io/Keras-Autoencoder/ (2017. 12 4)

[3] 조대협, 오토인코더를 이용한 비정상 거래 검출 모델의 구현 #1 - 신용카드 거래 데이터 분석, 2017. 9. 11, http://bcho.tistory.com/1197 (2017. 12. 4)

케라스로 구현하는 GAN

[1] Ian Goodfellow, “Generative Adversarial Networks”, 2014, https://arxiv.org/abs/1406.2661

[2] Ian Goodfellow, "Generative Adversarial Networks" at NIPS Workshop on Perturbation, Optimization, and Statistics, Montreal, 2014. (presentation)

[3] 깃허브, “PyTorch로 구현한 GAN”, https://github.com/devnag/pytorch-generative-adversarial-networks/blob/master/gan_pytorch.py (2017. 12. 4)

[4] Dev Nag, “Generative Adversarial Networks (GANs) in 50 lines of code (PyTorch)”, https://medium.com/@devnag/generative-adversarial-networks-gans-in-50-lines-of-code-pytorch-e81b79659e3f (2017. 12. 4)

[5] 유재준, “초짜 대학원생 입장에서 이해하는 Generative Adversarial Nets”, http://jaejunyoo.blogspot.com/2017/01/generative-adversarial-nets-1.html (2017. 12. 4)

[6] 링링 (ling1134), 생태학 - 상사(Analogous)와 상동(Homologous), 공진화(Coevolution)와 공생(Coexistence), 2013. 3. 18, http://blog.naver.com/PostView.nhn?blogId=ling1134&logNo=70162877431&parentCategoryNo=&categoryNo=34&viewDate=&isShowPopularPosts=false&from=postView (2017. 12. 4)

[7] 김범수, “Batch Normalization 설명 및 구현”, 2016. 1. 13, https://shuuki4.wordpress.com/2016/01/13/batch-normalization-설명-및-구현/ (2017. 12. 4)

[8] 임종대(번역), ‘기계 학습(Machine Learning, 머신 러닝)은 즐겁다! Part 7’, https://medium.com/@jongdae.lim/기계-학습-machine-learning-은-즐겁다-part-7-2435b4a55ccd (2017. 12. 2)

케라스로 구현하는 UNET

[1] Ronneberger, O., Fischer, P. & Brox, T., “U-net: Convolutional networks for biomedical image segmentation.” in International Conference on Medical Image Computing and Computer-Assisted Intervention 234–241 (Springer, 2015).

케라스 응용

[1] Arthur Juliani, “ResNets, HighwayNets, and DenseNets, Oh My!”, 2016. 10. 14, https://chatbotslife.com/resnets-highwaynets-and-densenets-oh-my-9bb15918ee32 (2017. 12. 2)

[2] Github.io, “Transfer learning” in CS231n: Convolutional Neural Networks for Visual Recognition, http://cs231n.github.io/transfer-learning/ (2017. 12. 2)

[3] Greg Chu, “How to use transfer learning and fine-tuning in Keras and Tensorflow to build an image recognition system and classify (almost) any object”, https://deeplearningsandbox.com/how-to-use-transfer-learning-and-fine-tuning-in-keras-and-tensorflow-to-build-an-image-recognition-94b0b02444f2 (2017. 12. 2)

[4] Felix Yu, “A Comprehensive guide to Fine-tuning Deep Learning Models in Keras (Part I)”, 2016. 10. 8, https://flyyufelix.github.io/2016/10/03/fine-tuning-in-keras-part1.html (2017. 12. 2)

[5] Adrian Rosebrock, “ImageNet: VGGNet, ResNet, Inception, and Xception with Keras”, 2017. 3. 20, https://www.pyimagesearch.com/2017/03/20/imagenet-vggnet-resnet-inception-xception-keras/ (2012. 12. 2)

keraspp's People

Contributors

jskdr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keraspp's Issues

ex6_1_ae를 cpu 텐서플로에서 돌리면 epochs를 늘여도 수렴이 잘 안됩니다.

파이썬3.7, 텐서플로2.0 cpu 버전입니다.
에포크에 따른 accuracy 변화는 아래와 같습니다.
책에 나온 결과와 차이가 매우 크게 납니다.

왜 그런 걸까요.


runfile('D:/Python/merong.py', wdir='D:/Python')
(60000, 784)
(10000, 784)
Train on 60000 samples, validate on 10000 samples
Epoch 1/10
60000/60000 [==============================] - 7s 123us/sample - loss: 0.6959 - accuracy: 0.3923 - val_loss: 0.6958 - val_accuracy: 0.3924
Epoch 2/10
60000/60000 [==============================] - 5s 84us/sample - loss: 0.6956 - accuracy: 0.3941 - val_loss: 0.6956 - val_accuracy: 0.3943
Epoch 3/10
60000/60000 [==============================] - 6s 108us/sample - loss: 0.6954 - accuracy: 0.3959 - val_loss: 0.6954 - val_accuracy: 0.3960
Epoch 4/10
60000/60000 [==============================] - 6s 104us/sample - loss: 0.6952 - accuracy: 0.3978 - val_loss: 0.6952 - val_accuracy: 0.3979
Epoch 5/10
60000/60000 [==============================] - 5s 86us/sample - loss: 0.6950 - accuracy: 0.3995 - val_loss: 0.6950 - val_accuracy: 0.3996
Epoch 6/10
60000/60000 [==============================] - 6s 101us/sample - loss: 0.6948 - accuracy: 0.4013 - val_loss: 0.6948 - val_accuracy: 0.4014
Epoch 7/10
60000/60000 [==============================] - 5s 87us/sample - loss: 0.6946 - accuracy: 0.4031 - val_loss: 0.6946 - val_accuracy: 0.4032
Epoch 8/10
60000/60000 [==============================] - 5s 84us/sample - loss: 0.6944 - accuracy: 0.4048 - val_loss: 0.6944 - val_accuracy: 0.4049
Epoch 9/10
60000/60000 [==============================] - 8s 134us/sample - loss: 0.6942 - accuracy: 0.4066 - val_loss: 0.6942 - val_accuracy: 0.4067
Epoch 10/10
60000/60000 [==============================] - 5s 90us/sample - loss: 0.6940 - accuracy: 0.4083 - val_loss: 0.6940 - val_accuracy: 0.4084

ANN/DNN에서 weight와 bias값들을 출력 할 수 있나요?

제가 keras에서 구현한 ANN 혹은 DNN 학습 결과를 C/C++로 된 프로그램에 적용하고자 합니다.
그러기 위해서 C/C++로 Neural network 코드를 만들었고, keras에서 계산한 hidden layer와 출력 layer의
weight와 bias 값을 출력해서 C/C++ 코드에 적용하려고 합니다.
가능할까요? 부탁 드립니다!

ex9_3_advanced_keras.py 에서 발생하는 ValueError

Backend_for_Lambda()yp = m.predict_on_batch([[1, 2, 3], [3, 4, 8]]) 부분에서 다음과 같은 에러가 발생하고 있습니다.

ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 2 arrays: [array([[1],
       [2],
       [3]]), array([[3],
       [4],
       [8]])]...

https://keras.io/ko/models/sequential/의 predict_on_batch를 참고해 보았지만, 어떻게 해결하면 좋을지 문의하고자 이슈 남깁니다.

Conv2D 사이즈 관련 질문드립니다

z = Conv2D(1, (7, 7))(x)

리포지토리 코드와 책에 따르면 인코딩 모델의 마지막 레이어는 7x7 사이즈를 갖도록 설정되었는데요,

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_12 (InputLayer)        (None, 28, 28, 1)         0         
_________________________________________________________________
cnn1 (Conv2D)                (None, 26, 26, 4)         40        
_________________________________________________________________
max_pooling1 (MaxPooling2D)  (None, 13, 13, 4)         0         
_________________________________________________________________
cnn3 (Conv2D)                (None, 11, 11, 8)         296       
_________________________________________________________________
max_pooling2 (MaxPooling2D)  (None, 6, 6, 8)           0         # <--- 이 부분
_________________________________________________________________
final_cnn (Conv2D)           (None, 1, 1, 1)           289       
=================================================================
Total params: 625
Trainable params: 625
Non-trainable params: 0
_________________________________________________________________

max_pooling2 레이어의 출력값이 6x6 인데 CNN 7x7 을 사용할 수 있나요?

위 summary() 결과를 얻기 위해 사용한 모델 코드는 아래와 같습니다.

        input_layer = Input(shape=self.input_shape)
        
        x = Conv2D(4, (3, 3), name='cnn1')(input_layer)
        x = MaxPooling2D((2, 2), padding='same', name='max_pooling1')(x)
        x = Conv2D(8, (3, 3), name='cnn3')(x)
        x = MaxPooling2D((2, 2), padding='same', name='max_pooling2')(x)
        
        output_layer = Conv2D(1, (6, 6), name='final_cnn')(x)

또한 7x7 사이즈의 CNN 을 사용했을 때, 나오는 에러는 아래와 같습니다.

ValueError: Negative dimension size caused by subtracting 7 from 6 for 'final_cnn_4/convolution' (op: 'Conv2D') with input shapes: [?,6,6,8], [7,7,8,1].

ex4_2_cnn_cifar10_cl 실행하니 you forgot to call super(YourClass, self).__init__() 에러가 납니다.

ex4_2_cnn_cifar10_cl 실행하니 아래와 같은 에러가 납니다.
도와주세요.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/softg/PycharmProjects/test/keraspp/ex4_2_cnn_cifar10_cl.py", line 22, in <module>
    main()
  File "C:/Users/softg/PycharmProjects/test/keraspp/ex4_2_cnn_cifar10_cl.py", line 18, in main
    m = Machine()
  File "C:/Users/softg/PycharmProjects/test/keraspp/ex4_2_cnn_cifar10_cl.py", line 14, in __init__
    super().__init__(X, y, nb_classes=10)
  File "C:\Users\softg\PycharmProjects\test\keraspp\keraspp\aicnn.py", line 125, in __init__
    self.set_model()
  File "C:\Users\softg\PycharmProjects\test\keraspp\keraspp\aicnn.py", line 136, in set_model
    self.model = CNN(nb_classes=nb_classes, in_shape=data.input_shape)
  File "C:\Users\softg\PycharmProjects\test\keraspp\keraspp\aicnn.py", line 25, in __init__
    model.build_model()
  File "C:\Users\softg\PycharmProjects\test\keraspp\keraspp\aicnn.py", line 49, in build_model
    model.cl_part = Model(x, z_cl)
  File "C:\Users\softg\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\network.py", line 316, in __setattr__
    'It looks like you are subclassing `Model` and you '
RuntimeError: It looks like you are subclassing `Model` and you forgot to call `super(YourClass, self).__init__()`. Always start with this line.

Process finished with exit code 1

ex7_2_gan_cnn_mnist_tf.py를 실행하니 다음과 같은 에러가 납니다.

Using TensorFlow backend.
<function image_data_format at 0x7fb6200a4d90>
Output_fold is GAN_OUT
2018-11-25 08:56:45.589349: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to
use: SSE4.1 SSE4.2 AVX
2018-11-25 08:56:45.679946: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (-1), but there
must be at least one NUMA node, so returning NUMA node zero
2018-11-25 08:56:45.680395: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties:
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:00:04.0
totalMemory: 11.17GiB freeMemory: 11.09GiB
2018-11-25 08:56:45.680431: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0
2018-11-25 08:56:46.007533: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-11-25 08:56:46.007606: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 0
2018-11-25 08:56:46.007617: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0: N
2018-11-25 08:56:46.007899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 wi
th 10749 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7)
Epoch is 0
Number of batches 2
Traceback (most recent call last):
File "ex7_2_gan_cnn_mnist_tf.py", line 211, in
main()
File "ex7_2_gan_cnn_mnist_tf.py", line 207, in main
train(args)
File "ex7_2_gan_cnn_mnist_tf.py", line 166, in train
d_loss, g_loss = gan.train_both(x)
File "ex7_2_gan_cnn_mnist_tf.py", line 97, in train_both
g_loss = self.train_on_batch(z, [1] * ln)
File "/home/zeroone_gcp/anaconda3/envs/env-py36-gym-tf/lib/python3.6/site-packages/keras/engine/training.py", line 1211, in train_on_batch
class_weight=class_weight)
File "/home/zeroone_gcp/anaconda3/envs/env-py36-gym-tf/lib/python3.6/site-packages/keras/engine/training.py", line 677, in _standardize_user_data
self._set_inputs(x)
File "/home/zeroone_gcp/anaconda3/envs/env-py36-gym-tf/lib/python3.6/site-packages/keras/engine/training.py", line 636, in _set_inputs
outputs = self.call(unpack_singleton(self.inputs))
File "/home/zeroone_gcp/anaconda3/envs/env-py36-gym-tf/lib/python3.6/site-packages/keras/engine/network.py", line 561, in call
if cache_key in self._output_tensor_cache:
AttributeError: 'GAN' object has no attribute '_output_tensor_cache'

환경은 다음과 같습니다. (conda list)

packages in environment at

Name Version Build Channel

_tflow_select 2.1.0 gpu
absl-py 0.6.1 py36_0
astor 0.7.1 py36_0
atari-py 0.1.6
backcall 0.1.0 py36_0
blas 1.0 mkl
bleach 3.0.2 py36_0
box2d-py 2.3.5
c-ares 1.15.0 h7b6447c_1
ca-certificates 2018.03.07 0
certifi 2018.10.15 py36_0
chardet 3.0.4
cloudpickle 0.6.1 py36_0
cudatoolkit 9.2 0
cudnn 7.2.1 cuda9.2_0
cupti 9.2.148 0
cycler 0.10.0 py36_0
dask-core 0.20.2 py36_0
dbus 1.13.2 h714fa37_1
decorator 4.3.0 py36_0
entrypoints 0.2.3 py36_2
expat 2.2.6 he6710b0_0
fontconfig 2.13.0 h9420a91_0
freetype 2.9.1 h8a8886c_1
future 0.17.1
gast 0.2.0 py36_0
glib 2.56.2 hd408876_0
gmp 6.1.2 h6c8ec71_1
grpcio 1.14.1 py36h9ba97e2_0
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb453b48_1
gym 0.10.9
h5py 2.8.0 py36h989c5e5_3
hdf5 1.10.2 hba1933b_1
icu 58.2 h9c2bf20_1
idna 2.7
imageio 2.4.1 py36_0
intel-openmp 2019.0 118
ipykernel 5.1.0 py36h39e3cac_0
ipython 7.1.1 py36h39e3cac_0
ipython_genutils 0.2.0 py36_0
ipywidgets 7.4.2 py36_0
jedi 0.13.1 py36_0
jinja2 2.10 py36_0
jpeg 9b h024ee3a_2
jsonschema 2.6.0 py36_0
jupyter 1.0.0 py36_7
jupyter_client 5.2.3 py36_0
jupyter_console 6.0.0 py36_0
jupyter_core 4.4.0 py36_0
keras 2.2.4 0
keras-applications 1.0.6 py36_0
keras-base 2.2.4 py36_0
keras-preprocessing 1.0.5 py36_0
kiwisolver 1.0.1 py36hf484d3e_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libgfortran-ng 7.3.0 hdf63c60_0
libpng 1.6.35 hbc83047_0
libprotobuf 3.6.1 hd408876_0
libsodium 1.0.16 h1bed415_0
libstdcxx-ng 8.2.0 hdf63c60_1
libtiff 4.0.9 he85c1e1_2
libuuid 1.0.3 h1bed415_2
libxcb 1.13 h1bed415_1
libxml2 2.9.8 h26e45fe_1
markdown 3.0.1 py36_0
markupsafe 1.0 py36h14c3975_1
matplotlib 3.0.1 py36h5429711_0
mistune 0.8.4 py36h7b6447c_0
mkl 2018.0.3 1
mkl_fft 1.0.6 py36h7dd41cf_0
mkl_random 1.0.1 py36h4414c95_1
nbconvert 5.3.1 py36_0
nbformat 4.4.0 py36_0
ncurses 6.1 hf484d3e_0
networkx 2.2 py36_1
notebook 5.7.0 py36_0
numpy 1.15.4 py36h1d66e8a_0
numpy 1.15.4
numpy-base 1.15.4 py36h81de0dd_0
olefile 0.46 py36_0
openssl 1.0.2p h14c3975_0
pandas 0.23.4 py36h04863e7_0
pandoc 2.2.3.2 0
pandocfilters 1.4.2 py36_1
parso 0.3.1 py36_0
patsy 0.5.1 py36_0
pcre 8.42 h439df22_0
pexpect 4.6.0 py36_0
pickleshare 0.7.5 py36_0
Pillow 5.3.0
pillow 5.3.0 py36h34e0f95_0
pip 18.1 py36_0
prometheus_client 0.4.2 py36_0
prompt_toolkit 2.0.7 py36_0
protobuf 3.6.1 py36he6710b0_0
ptyprocess 0.6.0 py36_0
pudb 2018.1
pydot 1.2.4 py36_0
pyglet 1.3.2
pygments 2.2.0 py36_0
PyOpenGL 3.1.0
pyparsing 2.3.0 py36_0
pyqt 5.9.2 py36h05f1152_2
python 3.6.6 h6e4f718_2
python-dateutil 2.7.5 py36_0
pytz 2018.7 py36_0
pywavelets 1.0.1 py36hdd07704_0
pyyaml 3.13 py36h14c3975_0
pyzmq 17.1.2 py36h14c3975_0
qt 5.9.6 h8703b6f_2
qtconsole 4.4.2 py36_0
readline 7.0 h7b6447c_5
requests 2.20.0
scikit-image 0.14.0 py36hf484d3e_1
scikit-learn 0.20.0
scipy 1.1.0
scipy 1.1.0 py36hfa4b5c9_1
seaborn 0.9.0 py36_0
send2trash 1.5.0 py36_0
setuptools 40.5.0 py36_0
sip 4.19.8 py36hf484d3e_0
six 1.11.0
six 1.11.0 py36_1
sklearn 0.0
sqlite 3.25.2 h7b6447c_0
statsmodels 0.9.0 py36h035aef0_0
tensorboard 1.11.0 py36hf484d3e_0
tensorflow 1.11.0 gpu_py36h9c9050a_0
tensorflow-base 1.11.0 gpu_py36had579c0_0
tensorflow-gpu 1.11.0 h0d30ee6_0
termcolor 1.1.0 py36_1
terminado 0.8.1 py36_1
testpath 0.4.2 py36_0
tk 8.6.8 hbc83047_0
toolz 0.9.0 py36_0
tornado 5.1.1 py36h7b6447c_0
traitlets 4.3.2 py36_0
urllib3 1.24.1
urwid 2.0.1
wcwidth 0.1.7 py36_0
webencodings 0.5.1 py36_1
werkzeug 0.14.1 py36_0
wheel 0.32.2 py36_0
widgetsnbextension 3.4.2 py36_0
xz 5.2.4 h14c3975_4
yaml 0.1.7 had09818_2
zeromq 4.2.5 hf484d3e_1
zlib 1.2.11 ha838bed_2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.