This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model=Sequential() | |
model.add(Conv2D(32,(3,3),strides=(1,1),padding='same',activation='relu',input_shape=(28,28,1))) | |
model.add(Flatten()) | |
model.add(Dense(100,activation='relu')) | |
model.add(Dense(10,activation='softmax')) | |
model.compile(loss='categorical_crossentropy', optimizer='nadam', metrics=['accuracy']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parsing ./cfg/tiny-yolo-voc.cfg | |
Parsing cfg/tiny-yolo-voc-1c.cfg | |
Loading bin/tiny-yolo-voc.weights ... | |
Successfully identified 63471556 bytes | |
Finished in 0.010008573532104492s | |
Building net ... | |
Source | Train? | Layer description | Output size | |
-------+--------+----------------------------------+--------------- | |
| | input | (?, 416, 416, 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model=baseline_model() | |
model.fit(X_train, y_train,validation_data=(X_test,y_test), epochs=10, batch_size=200,verbose=2) | |
scores=model.evaluate(X_test, y_test,verbose=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def baseline_model(): | |
model=Sequential() | |
model.add(Conv2D(32,(5,5),input_shape=(1,28,28),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.2)) | |
model.add(Flatten()) | |
model.add(Dense(128,activation='relu')) | |
model.add(Dense(num_classes, activation='softmax')) | |
model.compile(loss='categorical_crossentropy',optimizer='adam',metrics=['accuracy']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#normalize | |
X_train=X_train/255 | |
X_test=X_test/255 | |
#one hot encoding | |
y_train=np_utils.to_categorical(y_train) | |
y_test=np_utils.to_categorical(y_test) | |
num_classes=y_test.shape[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seed=7 | |
numpy.random.seed(seed) | |
(X_train, y_train), (X_test, y_test)=mnist.load_data() | |
X_train= X_train.reshape(X_train.shape[0],1,28,28).astype('float32') | |
X_test=X_test.reshape(X_test.shape[0],1,28,28).astype('float32') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.layers import Dropout | |
from keras.layers import Flatten | |
from keras.layers.convolutional import Conv2D | |
from keras.layers.convolutional import MaxPooling2D | |
from keras.utils import np_utils | |
from keras import backend as K |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
Build started 11-06-2018 15:29:00. | |
Project "C:\Users\Rahul\Documents\ELL\ELL\build\ALL_BUILD.vcxproj" on node 1 (default targets). | |
Project "C:\Users\Rahul\Documents\ELL\ELL\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\Rahul\Documents\ELL\ELL\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets). | |
InitializeBuildStatus: | |
Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. | |
CustomBuild: | |
All outputs are up-to-date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Github Battle</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
NewerOlder