Categories
Artificial Intelligence (AI) Mastering Development

How to generate non-linear line connection by using Taylor series for CNN like model in python?

I intend to implement CNN like progressively expanded neural network in Keras. The basic idea is the first input node can be decomposed into multiple nodes with different orders and coefficient, then each term is progressively added to form new neurons. decomposing single nodes to multiple ones can generate different non-linear line connection that generated […]

Categories
Artificial Intelligence (AI) Mastering Development

Any workaround to extend CNN with Tylor non-linear expansion in keras?

I intend to implement expandable CNN by using Tylor non-linear expansion in keras. I used cifar-10 dataset for input data. I looked into the basic concept of Tylor series and tried using Tylor non-linear expansion for input tensor, but the code that I sketched not perfectly fit for a computational graph I am trying to […]

Categories
Mastering Development

Tensorflow value error: Cannot feed value of shape (96, 50, 50) for Tensor u’InputData/X:0′, which has shape ‘(?, 50, 50, 1)’

I am new to TensorFlow and python. I am trying to run a code for lung cancer detection using CNN. Here is the script: I’m trying to train a CNN model. When I use model.fit while training I am getting an error from tflearn.layers.core import input_data, dropout, fully_connected from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.estimator […]

Categories
Artificial Intelligence (AI) Mastering Development

How do I modify the activation functions from keras?

I would like to use the activation function relu with its parameter alpha set to 0.2, but I could not figure out how this can be done for my model import numpy from tensorflow.keras.layers import Dense, Activation, Dropout, Input from tensorflow.keras.models import Sequential, Model, load_model from tensorflow.keras.optimizers import Adam model_input = Input(shape = x_train[0].shape) x […]

Categories
Mastering Development

How can I add convolutional layer to this problem?

I am a newbie in Convents, I designed a three-layer network, with 2 hidden layers to classify MNIST dataset. With L2 regularization, Dropout, and Early stopping. This code is what I have written so far. I was wondering how can I add 2 layers of convolutional neural network to the network? I understand that early […]

Categories
Development

How to complete following CNN architecture in keras code? where parameters and diagram listed in image file

I want to code following CNN architecture which is coded through keras library and all information is listed in the attached image file. how to pass the correct parameters? and please insert python is more needed. how to code for norm1, norm2, fc3 and fc4 present into the image file. I tried to code through […]

Categories
Artificial Intelligence (AI) Development

Which ANN can solve for y = x * x + b?

I am new to ANN. I am trying out several ‘simple’ algorithms to see what ANN can (or cannot) be used for and how. I played around with Conv2d once and had it recognize images succesfully. Now I am looking into trend line analyses. I have succeeded in training a network where it solved for […]

Categories
Artificial Intelligence (AI) Development

augmentation, cross-validation, test evaluation

I have, say, a (balanced) data-set with 2k images for binary classification. What I have done is that randomly divided the data-set into 5 folds; copy-pasted all 5-fold data-set to have 5 exact copies of data-set (folder_1 to folder_5, all absolutely same data-set) first fold in folder_1 is saved as test folder and remaining (fold_2, […]

Categories
Development

keras squeezenet ImportError: cannot import name ‘warnings’

File “C:\Users\user16\AppData\Local\Programs\Python\Python35\lib\site-packages\keras_squeezenet\squeezenet.py”, line 3, in from keras.layers import Input, Convolution2D, MaxPooling2D, Activation, concatenate, Dropout, warnings ImportError: cannot import name ‘warnings’

Categories
Development Linux Ubuntu

AttributeError: ‘tuple’ object has no attribute ‘data_dir’

I am developing this program on python and I keep getting this error AttributeError Traceback (most recent call last) <ipython-input-17-334b6c50bab3> in <module>() 30 31 args = parser.parse_known_args() —> 32 root = args.data_dir 33 save = args.save_dir 34 learningrate = args.learning_rate AttributeError: ‘tuple’ object has no attribute ‘data_dir’ I have been trying to figure out how […]