deep-learning

Change the input size in Keras

守給你的承諾、 提交于 2020-11-30 16:58:04
问题 I have trained a fully convolutional neural network with Keras. I have used the Functional API and have defined the input layer as Input(shape=(128,128,3)) , corresponding to the size of the images in my training set. However, I want to use the trained model on images of variable sizes (which should be ok because the network is fully convolutional). To do this, I need to change my input layer to Input(shape=(None,None,3)) . The obvious way to solve the problem would have been to train my

Change the input size in Keras

我们两清 提交于 2020-11-30 16:48:30
问题 I have trained a fully convolutional neural network with Keras. I have used the Functional API and have defined the input layer as Input(shape=(128,128,3)) , corresponding to the size of the images in my training set. However, I want to use the trained model on images of variable sizes (which should be ok because the network is fully convolutional). To do this, I need to change my input layer to Input(shape=(None,None,3)) . The obvious way to solve the problem would have been to train my

Change the input size in Keras

笑着哭i 提交于 2020-11-30 16:48:24
问题 I have trained a fully convolutional neural network with Keras. I have used the Functional API and have defined the input layer as Input(shape=(128,128,3)) , corresponding to the size of the images in my training set. However, I want to use the trained model on images of variable sizes (which should be ok because the network is fully convolutional). To do this, I need to change my input layer to Input(shape=(None,None,3)) . The obvious way to solve the problem would have been to train my

Python can't apply fit_generator to keras model with multiple input

狂风中的少年 提交于 2020-11-29 10:35:12
问题 I have the following model - this is LSTM + CNN with 3 inputs. And I built this generator function to train the model using fit_generator (based on this: https://stanford.edu/~shervine/blog/keras-how-to-generate-data-on-the-fly): class MultiInputDataGenerator(keras.utils.Sequence): 'Generates data for Keras' def __init__(self, list_IDs, labels, shuffle=True): 'Initialization' self.batch_size = 8 self.labels = labels self.list_IDs = list_IDs self.n_classes = 5 self.shuffle = shuffle self.on

Python can't apply fit_generator to keras model with multiple input

喜你入骨 提交于 2020-11-29 10:34:10
问题 I have the following model - this is LSTM + CNN with 3 inputs. And I built this generator function to train the model using fit_generator (based on this: https://stanford.edu/~shervine/blog/keras-how-to-generate-data-on-the-fly): class MultiInputDataGenerator(keras.utils.Sequence): 'Generates data for Keras' def __init__(self, list_IDs, labels, shuffle=True): 'Initialization' self.batch_size = 8 self.labels = labels self.list_IDs = list_IDs self.n_classes = 5 self.shuffle = shuffle self.on