Update README.md
Browse files
README.md
CHANGED
@@ -5,6 +5,58 @@ datasets:
|
|
5 |
- TokenBender/code_instructions_122k_alpaca_style
|
6 |
metrics:
|
7 |
- accuracy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
pipeline_tag: text-generation
|
9 |
base_model: codellama/CodeLlama-13b-Instruct-hf
|
10 |
---
|
|
|
5 |
- TokenBender/code_instructions_122k_alpaca_style
|
6 |
metrics:
|
7 |
- accuracy
|
8 |
+
language:
|
9 |
+
- en
|
10 |
+
widget:
|
11 |
+
- text: |
|
12 |
+
### Instruction: write a neural network complete code in Keras
|
13 |
+
### Input: Use cifar dataset
|
14 |
+
### Response:
|
15 |
+
|
16 |
+
output:
|
17 |
+
text: >-
|
18 |
+
from keras.datasets import cifar10
|
19 |
+
import numpy as np
|
20 |
+
from keras.models import Sequential
|
21 |
+
from keras.layers import Dense, Dropout, Activation, Flatten
|
22 |
+
from keras.layers import Conv2D, MaxPooling2D
|
23 |
+
from keras.utils import to_categorical
|
24 |
+
from keras.optimizers import Adam
|
25 |
+
|
26 |
+
# Load the CIFAR-10 dataset
|
27 |
+
(X_train, y_train), (X_test, y_test) = cifar10.load_data()
|
28 |
+
|
29 |
+
# Normalize pixel values to be between 0 and 1
|
30 |
+
X_train = X_train.astype('float32') / 255
|
31 |
+
X_test = X_test.astype('float32') / 255
|
32 |
+
|
33 |
+
# Convert class vectors to binary class matrices
|
34 |
+
y_train = to_categorical(y_train, num_classes=10)
|
35 |
+
y_test = to_categorical(y_test, num_classes=10)
|
36 |
+
|
37 |
+
# Create the model
|
38 |
+
model = Sequential()
|
39 |
+
model.add(Conv2D(32, (3, 3), input_shape=(32, 32, 3)))
|
40 |
+
model.add(Activation('relu'))
|
41 |
+
model.add(MaxPooling2D(pool_size=(2, 2)))
|
42 |
+
|
43 |
+
model.add(Conv2D(64, (3, 3)))
|
44 |
+
model.add(Activation('relu'))
|
45 |
+
model.add(MaxPooling2D(pool_size=(2, 2)))
|
46 |
+
|
47 |
+
model.add(Flatten())
|
48 |
+
model.add(Dense(64))
|
49 |
+
model.add(Activation('relu'))
|
50 |
+
model.add(Dropout(0.5))
|
51 |
+
model.add(Dense(10))
|
52 |
+
model.add(Activation('softmax'))
|
53 |
+
|
54 |
+
# Compile the model
|
55 |
+
model.compile(loss='categorical_crossentropy', optimizer=Adam(), metrics=['accuracy'])
|
56 |
+
|
57 |
+
# Train the model
|
58 |
+
model.fit(X_train, y_train, batch_size=32, epochs=10, validation_split=0.2)
|
59 |
+
|
60 |
pipeline_tag: text-generation
|
61 |
base_model: codellama/CodeLlama-13b-Instruct-hf
|
62 |
---
|