identity.py 361 Bytes
Newer Older
Benjamin Thomas Graham's avatar
Benjamin Thomas Graham committed
1
2
3
4
5
6
7
8
# Copyright 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from torch.nn import Module

9

Benjamin Thomas Graham's avatar
Benjamin Thomas Graham committed
10
11
12
class Identity(Module):
    def forward(self, input):
        return input
13

Benjamin Thomas Graham's avatar
Benjamin Thomas Graham committed
14
15
    def input_spatial_size(self, out_size):
        return out_size