I'm using Keras on Python to train a CNN autoencoder. In the fit() method I have to provide validation_split or validation_data. First, I would like to use 80% of my data as training data and 20% as validation data (random split). As soon as I have…
I have 70'000 2D numpy arrays on which I would like to train a CNN network using Keras. Holding them in memory would be an option but would consume a lot of memory. Thus, I would like to save the matrices on disk and load them on runtime. One option…
opt/conda/lib/python3.6/site-packages/keras/callbacks.py in on_batch_end(self, batch, logs)
234 else:
235 if k in self.totals:
--> 236 self.totals[k] += v * batch_size
237 …
Edit: Solved. Spelling mistake, see first comment
I use a MobileNetV2 pretrained model in Keras2/TF2
My images are scaled to 224x224
I set the model input shape: input_shape=(224,224,3)
Later I use ImageGenerator to create the images. Here I…
I'm building a new channel wise operation for my network.
A global average pooling result will multiply(element-wise) the first x(input) value.
But, when i run the train.py file, it will occur errors which i couldn't understand. pls HELP!!!
The…
epoch vs loss plot
I am getting above epoch vs loss plot while training on time series forecasting in keras 2.2.4. Model configuration 1 lstm layer, 1 dense layer, num epochs - 64. On some set of configuration I am getting right plot with just two…
I am trying to run some code on Deep embedding clustering on mnist with the help of Keras , however, I get the following error
from keras.datasets import mnist
import numpy as np
import keras.backend as K
from keras.engine.topology import Layer,…
After installing keras gpu, I try the simple example:
import keras
print(keras.__version__)
Prints the following output:
2.2.4
Using TensorFlow backend.
However, when I try to load a dataset:
form keras.datasets import mnist
It gives an…
Megre doesn't work anymore. I tried the new functional API (concatenate, add, multiply) but it doesn't work for models. How to implement it?
lower_model = [self.build_network(self.model_config['critic_lower'], input_shape=(self.history_length,…
Following is the code snippet:
merged_model = Sequential()
merged_model = concatenate([model1.output, model2.output, model3.output, model4.output, model5.output])
x = BatchNormalization()(merged_model)
x = Dense(300)(x)
x =…
I have followed link :
https://github.com/mayanksatnalika/ipython/blob/master/embeddings%20project/safe_driver/Safe_driver_Kaggle.ipynb
but getting error NameError: name 'Merge' is not defined
when i am running the following block :
from…
I am building a CNN model with the sequential keras API but getting the following error on line 12 (model.add(UpSampling2D((2, 2), padding='same')))
TypeError: ('Keyword argument not understood:', 'padding')
I am using Keras 2.2.4 and Tensorflow…
I have trouble using a trained Keras model in PySpark. The following versions of libraries are used:
tensorflow==1.1.0
h5py==2.7.0
keras==2.0.4
Also, I use Spark 2.4.0.
from pyspark.sql import SparkSession
import pyspark.sql.functions as func
from…
I am trying this example and got the following error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in…