Posts

Showing posts with the label model

TensorFlow and Keras -1

Image
  Q1. Binary classification In order to perform binary classification on a dataset (class  0  and  1 ) using a neural network, which of the options is  correct  regarding the outcomes of code snippets  a  and  b ? Here the labels of observation are in the form : [0, 0, 1...]. Common model: import tensorflow from keras.models import Sequential from keras.layers import Dense from tensorflow.keras.optimizers import SGD model = Sequential() model.add(Dense(50, input_dim=2, activation='relu', kernel_initializer='he_uniform')) opt = SGD(learning_rate=0.01) Code snippet a: model.add(Dense(1, activation='sigmoid')) model.compile(loss='binary_crossentropy', optimizer=opt, metrics=['accuracy']) Code snippet b: mode.add(Dense(1, activation='softmax')) model.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['accuracy']) The term " Required results " in the options means that the accur

How Machine Learning Works?

Image
  How Machine Learning Works? YouTube Video Link:  https://www.youtube.com/watch?v=uGe7TYdMF64&t=6s