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
82330eb5
Commit
82330eb5
authored
Sep 18, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use tf.layers.Conv2DTranspose (#291)
parent
9f790afc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tensorpack/models/conv2d.py
tensorpack/models/conv2d.py
+1
-1
tensorpack/models/utils.py
tensorpack/models/utils.py
+2
-2
No files found.
tensorpack/models/conv2d.py
View file @
82330eb5
...
@@ -130,7 +130,7 @@ def Deconv2D(x, out_channel, kernel_shape,
...
@@ -130,7 +130,7 @@ def Deconv2D(x, out_channel, kernel_shape,
b_init
=
tf
.
constant_initializer
()
b_init
=
tf
.
constant_initializer
()
with
rename_get_variable
({
'kernel'
:
'W'
,
'bias'
:
'b'
}):
with
rename_get_variable
({
'kernel'
:
'W'
,
'bias'
:
'b'
}):
layer
=
tf
.
layers
.
Deconv2D
(
layer
=
tf
.
layers
.
Conv2DTranspose
(
out_channel
,
kernel_shape
,
out_channel
,
kernel_shape
,
strides
=
stride
,
padding
=
padding
,
strides
=
stride
,
padding
=
padding
,
data_format
=
'channels_last'
if
data_format
==
'NHWC'
else
'channels_first'
,
data_format
=
'channels_last'
if
data_format
==
'NHWC'
else
'channels_first'
,
...
...
tensorpack/models/utils.py
View file @
82330eb5
...
@@ -66,8 +66,8 @@ def monkeypatch_tf_layers():
...
@@ -66,8 +66,8 @@ def monkeypatch_tf_layers():
from
tensorflow.python.layers.normalization
import
BatchNormalization
from
tensorflow.python.layers.normalization
import
BatchNormalization
tf
.
layers
.
BatchNormalization
=
BatchNormalization
tf
.
layers
.
BatchNormalization
=
BatchNormalization
from
tensorflow.python.layers.convolutional
import
Deconv2D
from
tensorflow.python.layers.convolutional
import
Conv2DTranspose
tf
.
layers
.
Deconv2D
=
Deconv2D
tf
.
layers
.
Conv2DTranspose
=
Conv2DTranspose
monkeypatch_tf_layers
()
monkeypatch_tf_layers
()
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