conv-neural-network

Convolutional Neural Network seems to be randomly guessing

旧城冷巷雨未停 提交于 2020-05-29 06:39:26
问题 So I am currently trying to build a race recognition program using a convolution neural network. I'm inputting 200px by 200px versions of the UTKFaceRegonition dataset (put my dataset on a google drive if you want to take a look). Im using 8 different classes (4 races * 2 genders) using keras and tensorflow, each having about 700 images but I have done it with 1000. The problem is when I run the network it gets at best 13.5% accuracy and about 11-12.5% validation accuracy, with a loss around

How to improve my CNN ? high and constant validation error

不打扰是莪最后的温柔 提交于 2020-05-23 09:32:07
问题 I am working on a problem for predicting a score of how fat cows are, based on images of cows. I applied a CNN to estimate the value which is between 0-5 ( the dataset i have, contains only values between 2.25 and 4 ) I am using 4 CNN layers and 3 Hidden layers. I actualy have 2 problems : 1/ I got 0.05 training error, but after 3-5 epochs the validation error remains at about 0.33. 2/ The value predicted by my NN are between 2.9 and 3.3 which is too narrow compared with the dataset range. Is

'Tensor' object has no attribute 'lower'

夙愿已清 提交于 2020-05-23 08:14:24
问题 I am fine-tuning a MobileNet with 14 new classes. When I add new layers by: x=mobile.layers[-6].output x=Flatten(x) predictions = Dense(14, activation='softmax')(x) model = Model(inputs=mobile.input, outputs=predictions) I get the error: 'Tensor' object has no attribute 'lower' Also using: model.compile(Adam(lr=.0001), loss='categorical_crossentropy', metrics=['accuracy']) model.fit_generator(train_batches, steps_per_epoch=18, validation_data=valid_batches, validation_steps=3, epochs=60,

Object of Type 'Dense' has no len()

你说的曾经没有我的故事 提交于 2020-05-17 08:46:17
问题 I try to create a CNN model, but always get this error message. Error: TypeError Traceback (most recent call last) in () ----> 1 model = simple_conv_model() 5 frames /usr/local/lib/python3.6/dist-packages/keras/engine/network.py in build_map(tensor, finished_nodes, nodes_in_progress, layer, node_index, tensor_index) 1345 1346 # Propagate to all previous tensors connected to this node. -> 1347 for i in range(len(node.inbound_layers)): 1348 x = node.input_tensors[i] 1349 layer = node.inbound

what should be the target in this deep learning image classification problem

十年热恋 提交于 2020-05-17 07:07:19
问题 I am doing a image classification project using CNN in keras. I have a dataset of about 900 photos of about 70 people .Each person has multiple photos of his different age. My goal is to predict the correct ID of the person if any one of his photo is in the input. Here is the glimpse of the data. My questions are: What should be my target column ?Is Target 'AGE' or 'ID'? 2-Do I need to do hot-encoding of the target column? For example if I used ID as my target,then do I have to do one-hot

what should be the target in this deep learning image classification problem

断了今生、忘了曾经 提交于 2020-05-17 07:07:02
问题 I am doing a image classification project using CNN in keras. I have a dataset of about 900 photos of about 70 people .Each person has multiple photos of his different age. My goal is to predict the correct ID of the person if any one of his photo is in the input. Here is the glimpse of the data. My questions are: What should be my target column ?Is Target 'AGE' or 'ID'? 2-Do I need to do hot-encoding of the target column? For example if I used ID as my target,then do I have to do one-hot

How to combine a fully convolutional neural network with a SSD Mobilenet model?

旧城冷巷雨未停 提交于 2020-05-17 06:25:08
问题 I want to perform instance segmentation using SSD model. For this, I have used an FCN model to perform instance segmentation and now can I combine this with SSD model to get something like Mask SSD ? It should look something like this or something like this 来源: https://stackoverflow.com/questions/61734815/how-to-combine-a-fully-convolutional-neural-network-with-a-ssd-mobilenet-model

RuntimeError: The size of tensor a (133) must match the size of tensor b (10) at non-singleton dimension 1

橙三吉。 提交于 2020-05-16 03:05:08
问题 I am training a CNN model. I am facing issue while doing the training iteration for my model. The code is as below: class Net(nn.Module): def __init__(self): super(Net, self).__init__() #convo layers self.conv1 = nn.Conv2d(3,32,3) self.conv2 = nn.Conv2d(32,64,3) self.conv3 = nn.Conv2d(64,128,3) self.conv4 = nn.Conv2d(128,256,3) self.conv5 = nn.Conv2d(256,512,3) #pooling layer self.pool = nn.MaxPool2d(2,2) #linear layers self.fc1 = nn.Linear(512*5*5,2048) self.fc2 = nn.Linear(2048,1024) self

TimeDistributed of a KerasLayer in Tensorflow 2.0

醉酒当歌 提交于 2020-05-15 19:22:05
问题 I'm trying to build a CNN + RNN using a pre-trained model from tensorflow-hub: base_model = hub.KerasLayer('https://tfhub.dev/google/imagenet/resnet_v2_50/feature_vector/4', input_shape=(244, 244, 3) base_model.trainable = False model = Sequential() model.add(TimeDistributed(base_model, input_shape=(15, 244, 244, 3))) model.add(LSTM(512)) model.add(Dense(256, activation='relu')) model.add(Dense(3, activation='softmax')) adam = Adam(learning_rate=learning_rate) model.compile(loss='categorical

TimeDistributed of a KerasLayer in Tensorflow 2.0

こ雲淡風輕ζ 提交于 2020-05-15 19:21:08
问题 I'm trying to build a CNN + RNN using a pre-trained model from tensorflow-hub: base_model = hub.KerasLayer('https://tfhub.dev/google/imagenet/resnet_v2_50/feature_vector/4', input_shape=(244, 244, 3) base_model.trainable = False model = Sequential() model.add(TimeDistributed(base_model, input_shape=(15, 244, 244, 3))) model.add(LSTM(512)) model.add(Dense(256, activation='relu')) model.add(Dense(3, activation='softmax')) adam = Adam(learning_rate=learning_rate) model.compile(loss='categorical