Skip to content

Commit

Permalink
Merged with Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
darshmgandhi committed Nov 19, 2021
1 parent de1cb8d commit cc23d3b
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions ui/agender_ui/login_signup/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@

# Create your views here.

# def age_model():
# model = tf.keras.Sequential()
# model.add(tf.keras.layers.Conv2D(
# 64, 3, activation='relu', input_shape=(200, 200, 3)))
# model.add(tf.keras.layers.MaxPool2D())
# model.add(tf.keras.layers.Conv2D(128, 3, activation='relu'))
# model.add(tf.keras.layers.MaxPool2D())
# model.add(tf.keras.layers.Conv2D(256, 3, activation='relu'))
# model.add(tf.keras.layers.MaxPool2D())
# model.add(tf.keras.layers.Flatten())
# model.add(tf.keras.layers.Dense(1024, activation='relu'))
# model.add(tf.keras.layers.Dropout(0.1))
# model.add(tf.keras.layers.Dense(512, activation='relu'))
# model.add(tf.keras.layers.Dropout(0.1))
# model.add(tf.keras.layers.Dense(512, activation='relu'))
# model.add(tf.keras.layers.Dropout(0.1))
# model.add(tf.keras.layers.Dense(20, activation='softmax'))
# model.compile(optimizer='sgd',
# loss=tf.losses.SparseCategoricalCrossentropy(
# from_logits=False),
# metrics=['accuracy'])
# model.load_weights('./models/checkpoint')
# return model


# model = age_model()
def age_model():
model = tf.keras.Sequential()
model.add(tf.keras.layers.Conv2D(
64, 3, activation='relu', input_shape=(200, 200, 3)))
model.add(tf.keras.layers.MaxPool2D())
model.add(tf.keras.layers.Conv2D(128, 3, activation='relu'))
model.add(tf.keras.layers.MaxPool2D())
model.add(tf.keras.layers.Conv2D(256, 3, activation='relu'))
model.add(tf.keras.layers.MaxPool2D())
model.add(tf.keras.layers.Flatten())
model.add(tf.keras.layers.Dense(1024, activation='relu'))
model.add(tf.keras.layers.Dropout(0.1))
model.add(tf.keras.layers.Dense(512, activation='relu'))
model.add(tf.keras.layers.Dropout(0.1))
model.add(tf.keras.layers.Dense(512, activation='relu'))
model.add(tf.keras.layers.Dropout(0.1))
model.add(tf.keras.layers.Dense(20, activation='softmax'))
model.compile(optimizer='sgd',
loss=tf.losses.SparseCategoricalCrossentropy(
from_logits=False),
metrics=['accuracy'])
model.load_weights('./models/checkpoint')
return model


model = age_model()


def signup(request):
Expand Down Expand Up @@ -244,10 +244,10 @@ def form(request):
# return render(request, 'webcam.html')


@ csrf_exempt
def save_form(request):
if request.method == 'POST':
pass
# @ csrf_exempt
# def save_form(request):
# if request.method == 'POST':
# pass

@csrf_exempt
def save_formdata(request):
Expand Down

0 comments on commit cc23d3b

Please sign in to comment.