Closed joshgev closed 7 years ago
Looks awesome! Can you add documentation for this before we merge?
We can add documentation in another pull request. Here is an example Kurfile:
---
settings:
# Backend to use
backend:
name: keras
backend: tensorflow
parallel: 4
# Data provider settings
provider: &provider
batch_size: 128
# Hyperparameters
cnn:
kernels: [32, 64, 128]
size: [[5, 5], [2, 2], [2, 2]]
strides: [[1, 1], [2, 2], [2, 2]]
# The model itself.
# This is parsed immediately after the "parameters" block.
model:
- input: brain_probe_image
- expand: -1
- for:
range: "{{ cnn.kernels|length }}"
iterate:
- convolution:
kernels: "{{ cnn.kernels[index] }}"
size: "{{ cnn.size[index] }}"
strides: "{{ cnn.strides[index] }}"
- activation: relu
- flatten:
- dense: 6
- activation: softmax
name: category_label
# The training section
train:
data:
- mind:
path: train
provider:
<<: *provider
log: mindreading_category.log
epochs: 50
weights:
initial: mindreading_category.best.valid.w
best: mindreading_category.best.train.w
last: mindreading_category.last.w
optimizer:
name: adam
learning_rate: 0.0001
The validation section
validate:
data:
- mind:
path: validate
provider:
<<: *provider
weights: mindreading_category.best.valid.w
# The loss function selection
loss:
# The target is the label you want your model to guess and get correct
- target: category_label
name: categorical_crossentropy
...
These modifications add a supplier and associated sources to kur in order to support the Stanford mind reading data set.