Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
ef8aa2a9
Commit
ef8aa2a9
authored
Jan 14, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme
parent
09d1e881
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
14 deletions
+3
-14
README.md
README.md
+1
-0
example_mnist.py
example_mnist.py
+2
-14
No files found.
README.md
View file @
ef8aa2a9
# tensorpack
Neural Network Toolbox based on TensorFlow
In development. No document.
## Features:
+
Scoped abstraction of common models.
...
...
example_mnist.py
View file @
ef8aa2a9
...
...
@@ -39,14 +39,6 @@ def get_model(inputs, is_training):
image
,
label
=
inputs
image
=
tf
.
expand_dims
(
image
,
3
)
# add a single channel
#if is_training:
## augmentations
#image, label = tf.train.slice_input_producer(
#[image, label], shuffle=False, name='slice_queue')
#image, label = tf.train.batch(
#[image, label], BATCH_SIZE, capacity=CAPACITY,
#num_threads=2, enqueue_many=False)
l
=
Conv2D
(
'conv0'
,
image
,
out_channel
=
32
,
kernel_shape
=
5
)
l
=
MaxPooling
(
'pool0'
,
l
,
2
)
l
=
Conv2D
(
'conv1'
,
l
,
out_channel
=
40
,
kernel_shape
=
3
)
...
...
@@ -93,7 +85,6 @@ def get_config():
dataset_train
=
BatchData
(
dataset
.
Mnist
(
'train'
),
128
)
dataset_test
=
BatchData
(
dataset
.
Mnist
(
'test'
),
256
,
remainder
=
True
)
step_per_epoch
=
dataset_train
.
size
()
step_per_epoch
=
30
#dataset_test = FixedSizeData(dataset_test, 20)
sess_config
=
get_default_sess_config
()
...
...
@@ -106,10 +97,8 @@ def get_config():
tf
.
placeholder
(
tf
.
int32
,
shape
=
(
None
,),
name
=
'label'
)
]
input_queue
=
tf
.
RandomShuffleQueue
(
100
,
50
,
[
x
.
dtype
for
x
in
input_vars
],
name
=
'queue'
)
#input_queue = tf.FIFOQueue(
#100, [x.dtype for x in input_vars], name='queue')
input_queue
=
tf
.
FIFOQueue
(
100
,
[
x
.
dtype
for
x
in
input_vars
],
name
=
'queue'
)
lr
=
tf
.
train
.
exponential_decay
(
learning_rate
=
1e-4
,
...
...
@@ -124,7 +113,6 @@ def get_config():
callbacks
=
Callbacks
([
SummaryWriter
(
print_tag
=
[
'train_cost'
,
'train_error'
]),
PeriodicSaver
(),
#ValidationCallback(dataset_test, 'test')
ValidationError
(
dataset_test
,
prefix
=
'test'
),
]),
session_config
=
sess_config
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment