Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #187 from DerThorsten/deconvelu
Browse files Browse the repository at this point in the history
added stride param
  • Loading branch information
DerThorsten committed Aug 9, 2019
2 parents ff5459c + b9d2003 commit 90d4b9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inferno/extensions/layers/convolutional.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,27 @@ def __init__(self, in_channels, out_channels, kernel_size):

class DeconvELU2D(ConvActivation):
"""2D deconvolutional layer with ELU and orthogonal weight initialization."""
def __init__(self, in_channels, out_channels, kernel_size=2):
def __init__(self, in_channels, out_channels, kernel_size=2, stride=2):
super(DeconvELU2D, self).__init__(in_channels=in_channels,
out_channels=out_channels,
kernel_size=kernel_size,
dim=2,
activation='ELU',
deconv=True,
stride=stride,
initialization=OrthogonalWeightsZeroBias())


class DeconvELU3D(ConvActivation):
"""3D deconvolutional layer with ELU and orthogonal weight initialization."""
def __init__(self, in_channels, out_channels, kernel_size=2):
def __init__(self, in_channels, out_channels, kernel_size=2, stride=2):
super(DeconvELU3D, self).__init__(in_channels=in_channels,
out_channels=out_channels,
kernel_size=kernel_size,
dim=3,
activation='ELU',
deconv=True,
stride=2,
initialization=OrthogonalWeightsZeroBias())


Expand Down

0 comments on commit 90d4b9b

Please sign in to comment.