Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
f8e854b5
Unverified
Commit
f8e854b5
authored
Feb 02, 2018
by
Sergii Khomenko
Committed by
GitHub
Feb 02, 2018
Browse files
Merge branch 'master' into dataset
parents
52c7c53e
31adae53
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
62 deletions
+64
-62
research/textsum/README.md
research/textsum/README.md
+1
-1
tutorials/image/cifar10/cifar10.py
tutorials/image/cifar10/cifar10.py
+3
-3
tutorials/image/cifar10/cifar10_input.py
tutorials/image/cifar10/cifar10_input.py
+60
-58
No files found.
research/textsum/README.md
View file @
f8e854b5
...
@@ -2,7 +2,7 @@ Sequence-to-Sequence with Attention Model for Text Summarization.
...
@@ -2,7 +2,7 @@ Sequence-to-Sequence with Attention Model for Text Summarization.
Authors:
Authors:
Xin Pan
(xpan@google.com, github:panyx0718),
Xin Pan
Peter Liu (peterjliu@google.com, github:peterjliu)
Peter Liu (peterjliu@google.com, github:peterjliu)
<b>
Introduction
</b>
<b>
Introduction
</b>
...
...
tutorials/image/cifar10/cifar10.py
View file @
f8e854b5
...
@@ -204,7 +204,7 @@ def inference(images):
...
@@ -204,7 +204,7 @@ def inference(images):
kernel
=
_variable_with_weight_decay
(
'weights'
,
kernel
=
_variable_with_weight_decay
(
'weights'
,
shape
=
[
5
,
5
,
3
,
64
],
shape
=
[
5
,
5
,
3
,
64
],
stddev
=
5e-2
,
stddev
=
5e-2
,
wd
=
0.0
)
wd
=
None
)
conv
=
tf
.
nn
.
conv2d
(
images
,
kernel
,
[
1
,
1
,
1
,
1
],
padding
=
'SAME'
)
conv
=
tf
.
nn
.
conv2d
(
images
,
kernel
,
[
1
,
1
,
1
,
1
],
padding
=
'SAME'
)
biases
=
_variable_on_cpu
(
'biases'
,
[
64
],
tf
.
constant_initializer
(
0.0
))
biases
=
_variable_on_cpu
(
'biases'
,
[
64
],
tf
.
constant_initializer
(
0.0
))
pre_activation
=
tf
.
nn
.
bias_add
(
conv
,
biases
)
pre_activation
=
tf
.
nn
.
bias_add
(
conv
,
biases
)
...
@@ -223,7 +223,7 @@ def inference(images):
...
@@ -223,7 +223,7 @@ def inference(images):
kernel
=
_variable_with_weight_decay
(
'weights'
,
kernel
=
_variable_with_weight_decay
(
'weights'
,
shape
=
[
5
,
5
,
64
,
64
],
shape
=
[
5
,
5
,
64
,
64
],
stddev
=
5e-2
,
stddev
=
5e-2
,
wd
=
0.0
)
wd
=
None
)
conv
=
tf
.
nn
.
conv2d
(
norm1
,
kernel
,
[
1
,
1
,
1
,
1
],
padding
=
'SAME'
)
conv
=
tf
.
nn
.
conv2d
(
norm1
,
kernel
,
[
1
,
1
,
1
,
1
],
padding
=
'SAME'
)
biases
=
_variable_on_cpu
(
'biases'
,
[
64
],
tf
.
constant_initializer
(
0.1
))
biases
=
_variable_on_cpu
(
'biases'
,
[
64
],
tf
.
constant_initializer
(
0.1
))
pre_activation
=
tf
.
nn
.
bias_add
(
conv
,
biases
)
pre_activation
=
tf
.
nn
.
bias_add
(
conv
,
biases
)
...
@@ -262,7 +262,7 @@ def inference(images):
...
@@ -262,7 +262,7 @@ def inference(images):
# and performs the softmax internally for efficiency.
# and performs the softmax internally for efficiency.
with
tf
.
variable_scope
(
'softmax_linear'
)
as
scope
:
with
tf
.
variable_scope
(
'softmax_linear'
)
as
scope
:
weights
=
_variable_with_weight_decay
(
'weights'
,
[
192
,
NUM_CLASSES
],
weights
=
_variable_with_weight_decay
(
'weights'
,
[
192
,
NUM_CLASSES
],
stddev
=
1
/
192.0
,
wd
=
0.0
)
stddev
=
1
/
192.0
,
wd
=
None
)
biases
=
_variable_on_cpu
(
'biases'
,
[
NUM_CLASSES
],
biases
=
_variable_on_cpu
(
'biases'
,
[
NUM_CLASSES
],
tf
.
constant_initializer
(
0.0
))
tf
.
constant_initializer
(
0.0
))
softmax_linear
=
tf
.
add
(
tf
.
matmul
(
local4
,
weights
),
biases
,
name
=
scope
.
name
)
softmax_linear
=
tf
.
add
(
tf
.
matmul
(
local4
,
weights
),
biases
,
name
=
scope
.
name
)
...
...
tutorials/image/cifar10/cifar10_input.py
View file @
f8e854b5
...
@@ -157,6 +157,7 @@ def distorted_inputs(data_dir, batch_size):
...
@@ -157,6 +157,7 @@ def distorted_inputs(data_dir, batch_size):
# Create a queue that produces the filenames to read.
# Create a queue that produces the filenames to read.
filename_queue
=
tf
.
train
.
string_input_producer
(
filenames
)
filename_queue
=
tf
.
train
.
string_input_producer
(
filenames
)
with
tf
.
name_scope
(
'data_augmentation'
):
# Read examples from files in the filename queue.
# Read examples from files in the filename queue.
read_input
=
read_cifar10
(
filename_queue
)
read_input
=
read_cifar10
(
filename_queue
)
reshaped_image
=
tf
.
cast
(
read_input
.
uint8image
,
tf
.
float32
)
reshaped_image
=
tf
.
cast
(
read_input
.
uint8image
,
tf
.
float32
)
...
@@ -226,6 +227,7 @@ def inputs(eval_data, data_dir, batch_size):
...
@@ -226,6 +227,7 @@ def inputs(eval_data, data_dir, batch_size):
if
not
tf
.
gfile
.
Exists
(
f
):
if
not
tf
.
gfile
.
Exists
(
f
):
raise
ValueError
(
'Failed to find file: '
+
f
)
raise
ValueError
(
'Failed to find file: '
+
f
)
with
tf
.
name_scope
(
'input'
):
# Create a queue that produces the filenames to read.
# Create a queue that produces the filenames to read.
filename_queue
=
tf
.
train
.
string_input_producer
(
filenames
)
filename_queue
=
tf
.
train
.
string_input_producer
(
filenames
)
...
...
Prev
1
2
Next
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