I have updated the example program in the keras cifar10_resnet to work on the cifar 100 instead of cifar 10 data set. I am able to run the code only for the first epoch. When i try to save the model the programs breaks with the below error -
'KeyError: 'Cannot set attribute. Group with name "keras_version" exists.'
I have python 3.5.2, tensorflow gpu version 1.10.1 in my laptop.
I came across the same problem just now. I can't motivate exactly why, but I believe it has to do with some version compatibility problems between Tensorflow and Keras. Just changing the imports removed the problem for me.
The following code gives me that error when I run the model (and it gets to the second epoch)
import os.path as op
import pandas as pd
import numpy as np
import tensorflow as tf
from keras.callbacks import ModelCheckpoint, TensorBoard
from keras.models import Sequential
from keras.layers import LSTM, Activation, Dense
from keras.utils.np_utils import to_categorical
import matplotlib.pyplot as plt
but if I change it to
import os.path as op
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Activation, Dense
from keras.utils.np_utils import to_categorical
import matplotlib.pyplot as plt
it works as expected. I would assume that the Keras version I installed via pip (Keras==2.2.3) is incompatible with the Tensorflow version I have installed (tensorflow-gpu==1.10.0). Using the Keras functionality that comes bundled with Tensorflow (tensorflow.keras) solved it in my case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With