Completed
Push — master ( f73e69...91b7c0 )
by Raphael
01:35
created

Reshape.__init__()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 3
rs 10
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
from . import NeuralLayer
5
6
class Reshape(NeuralLayer):
7
    """
8
    Reshape layer.
9
    """
10
11
    def __init__(self, pattern):
12
        super(Reshape, self).__init__("dimshuffle")
13
        self.pattern = pattern
14
15
    def compute_tensor(self, x):
16
        return x.reshape(self.pattern)