SPP net is used for variable size input images. SPP Net implementation in keras in here uses two model.fit for two sizes of images. I have 278 images of all different sizes, so how to use model.fit in this case? and how keras calculating efficiency…
I want to use Keras layers pooling layers without making a model. Every time I see example related to Keras,I see them in model form, like as follows:
model = Sequential()
model.add(Conv2D(2, kernel_size=(3, 3),activation='relu',
…
keras 2.1.5 / TF backend
I tried to use lambda layer to do image pre-process (via function)
the model:
from keras.applications.resnet50 import preprocess_input
base_model = keras.applications.resnet50.ResNet50(include_top=False, input_shape=(224,…
How I solve this issue
ValueError: Error when checking target: expected conv-decode3 to have shape (None, 14, 300) but got array with shape (6559, 16, 300)
NUM_WORDS = 3
pool_size = 2
x = Input(shape=(16, 300), name="input")
h = x
h =…
I'm trying to reproduce this work but I receive the following warning:
/usr/local/lib/python3.5/dist-packages/ipykernel_launcher.py:2: UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor("de...,…
I am trying to train a multi-task multi-label classifier using Keras. The output layer is a fork of two outputs. The task of each output layer is to predict the categories of its task. The y vectors are OneHot encoded.
I am using a custom…
I have error when I tried to create custom metric for keras (Intersection over union).
I want to find intersection over union of two images (tensors)
def IoU(y_true,y_pred):
y_true_f = K.flatten(y_true)
y_pred_f = K.flatten(y_pred)
…
Is there a way to speed up loading a model in Keras?
I'm using a transfer-learned inception model.
It seems to take 13 seconds to load a model from my experiences.
I want to load deploy some models onto smart phones.
Using Tensorflow as backend.…
How you can program keras or tensorflow to partitionate training on multiple GPU, let's say you are in an amaozn ec2 instance that has 8 GPU's and you want to use all of them to train faster, but your code is just for a single cpu or GPU ?
In Keras I'm trying to figure out how to calculate a custom metric or loss that filters out or masks some values so that they don't contribute to the returned value. I'm stuck on how to get a tensor slice or how to iterate with an if: over the…
Very briefly my question relates to image-size not remaining the same as the input image size after a maxpool layer when I use padding = 'same' in Keras code. I am going through the Keras blog: Building Autoencoders in Keras. I am building…
I want to train a model with one input and two outputs in Keras, but I have a couple of issues with the setup of validations.
1) The Keras functional API documentation says that model.fit can take in a list of numpy arrays as output when there are…
EDIT: It was actually a divide-by-zero error. :(
I created a metric function in Keras to calculate the average fractional error; that is, for each actual/predicted pair I calculate abs(actual - predicted)/actual, then find the mean across all the…
In keras say you have
layer1
and
layer2
You want to add these two layers, and you have to use Add from keras.layers.merge and you can't use the functional api.
Add doesn't take any inputs, so I don't see how it can possibly help in setting up the…
I have implemented a convolutional auto-encoder with Keras, using the Theano backend. I am changing my approach to try to deal with images of different sizes. As long as I use numpy's stack function to build the dataset (equal size images) I am…