title: How Do I Define the Name 'X_train' to create a Support Vector Machine Model from a Image Classification Tutorial?
body: <p>Hello StackOverflow Community,</p>
  <p>I hope you are all doing well. I am new to the Stack Overflow Community. Here is my question.</p>
  <p>I have been recently trying to complete this Image Classification Tutorial found here (URL: <a href="https://iq.opengenus.org/basics-of-machine-learning-image-classification-techniques/" rel="nofollow noreferrer">https://iq.opengenus.org/basics-of-machine-learning-image-classification-techniques/</a>).</p>
  <p>I have taken a .DICOM file (Medical Image) and converted it to  a .PNG file format. This is being done in Jupyter Notebook with Python the Anaconda Platform.</p>
  <p>I have been able to perform the Image Pre-Processing Analysis after looking at Stack Overflow and GitHub. I have tried to do the same thing for the Support Vector Machine.</p>
  <p>However, I am having trouble trying to define the X_train name for the following code below:</p>
  <pre><code>model = Sequential()
  model.add(Conv2D(16,(5,5),padding='valid',input_shape = X_train.shape[1:])) # This is the line of code I am having a problem with.
  model.add(Activation('relu'))
  model.add(MaxPooling2D(pool_size=(2,2),strides=2,padding = 'valid'))
  model.add(Dropout(0.4))
  model.add(Conv2D(32,(5,5),padding='valid'))
  model.add(Activation('relu'))
  model.add(MaxPooling2D(pool_size=(2,2),strides=2,padding = 'valid'))
  model.add(Dropout(0.6))
  model.add(Conv2D(64,(5,5),padding='valid'))
  model.add(Activation('relu'))
  model.add(Dropout(0.8))
  model.add(Flatten())
  model.add(Dense(2))
  model.add(Activation('softmax'))
  
  model_feat = Model(inputs=model.input,outputs=model.get_layer('dense_1').output)
  
  feat_train = model_feat.predict(X_train)
  </code></pre>
  <p>I believe that the X_train is connected to the &quot;Translation&quot; code below:</p>
  <pre><code>img = cv2.warpAffine(img, np.float32([[1, 0, 84], [0, 1, 56]]), (img.shape[0], img.shape[1]),
  borderMode=cv2.BORDER_CONSTANT,borderValue=(144, 159, 162))
  </code></pre>
  <p>If needed, I can provide more of the code I have compiled. Do you have any recommendations on what to use or do you recommend a better tutorial all together? Any help would be appreciated. Thank you so much!</p>