deepy.layers.Flatten   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %
Metric Value
dl 0
loc 10
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 2 1
A output() 0 2 1
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
from . import NeuralLayer
5
import theano.tensor as T
6
7
class Flatten(NeuralLayer):
8
    """
9
    Flatten layer.
10
    """
11
12
    def __init__(self):
13
        super(Flatten, self).__init__("flatten")
14
    
15
    def output(self, x):
16
        return T.flatten(x, 2)