Category : keras

I’m designing a CNN for mnist dataset. Then it returns an error ValueError: Negative dimension size caused by subtracting 3 from 2 for ‘{{node conv2d_23/Conv2D}} = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], explicit_paddings=[], padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true](batch_normalization_19/cond/Identity, conv2d_23/Conv2D/ReadVariableOp)’ with input shapes: [?,2,2,12], [3,3,12,12]. I tried to change padding = ‘valid’ to padding = ..

Read more

I want to install tensorflow (and Keras too) for R. I used thoses lines install.packages("keras") install.packages("tensorflow") library(keras) library(tensorflow) And now I want to do : install_tensorflow() install_keras() But my python environement is inconsistent. Is there a way to told R to look for virtual python environnement ? Thanks Source: Python..

Read more

I am facing this issue while training the model. Everything seems fine but I cannot understand the problem. This is the error I am facing: InvalidArgumentError: Matrix size-incompatible: In[0]: [32,29], In[1]: [128,1] [[node gradient_tape/sequential_11/dense_23/MatMul (defined at <ipython-input-89-9b0f878131ef>:2) ]] [Op:__inference_train_function_10031] Function call stack: train_function Here is the model summary: Model: "sequential_11" _________________________________________________________________ Layer (type) Output Shape ..

Read more

I am working on a computer vision project, for input i have 6 classes each containing gray images with otsu’s thresholding method applied of size (224,224) and i have trained the model and stored it in RecogModel.tfl file here is the model i am using. model = Sequential() # 1st Convolutional Layer model.add(Conv2D(filters=96, input_shape=(224,224,1), kernel_size=(11,11),strides=(4,4), ..

Read more

I am trying to apply data augmentation for a binary image classification problem in the following way as mentioned in tensorflow docs: https://www.tensorflow.org/tutorials/images/classification#data_augmentation My model is this: Sequential([ data_augmentation, layers.experimental.preprocessing.Rescaling(1./255), layers.Conv2D(16, 3, padding=’same’, activation=’relu’), layers.MaxPooling2D(), layers.Dropout(0.2), layers.Conv2D(32, 3, padding=’same’, activation=’relu’), layers.MaxPooling2D(), layers.Dropout(0.2), layers.Conv2D(64, 3, padding=’same’, activation=’relu’), layers.MaxPooling2D(), layers.Flatten(), layers.Dense(128, activation=’relu’), layers.Dropout(0.5), layers.Dense(1, activation=’sigmoid’) ]) When ..

Read more