Completed
Push — master ( 394368...090fba )
by Raphael
01:33
created

DisconnectedGrad.grad()   A

Complexity

Conditions 2

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 2
rs 10
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
from theano.compile import ViewOp
4
from theano.gradient import DisconnectedType
5
6
7
class DisconnectedGrad(ViewOp):
8
    def grad(self, args, g_outs):
9
        return [ DisconnectedType()() for g_out in g_outs]
10
11
    def connection_pattern(self, node):
12
        return [[False]]
13
14
15
disconnected_grad = DisconnectedGrad()