图普科技2018届秋招在线笔试 register

Ended

Participants:463

Verdict:Wrong Answer
Score:0 / 100
Submitted:2017-10-15 15:43:11

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import copy
def relu(x):
    if x>0:
        return x
    else:
        return 0
        
def pre_process(x):
    return (x/127.5 - 1)
    
def get_chanel(arrayheightwidthsize):
    assert len(array) == height * width * size
    chanels = list()
    for i in range(size):
        c = [e for e in array[i::size]]
        chanels.append(c)
    return chanels
def array2d(arrayheightwidth):
    res = []
    for i in range(height):
        res.append(array[i*height:(i+1)*height])
    return res
# print array2d([1,2,3,4,5,6,7,8,9], 3, 3)
def zeropadding(array_2dheightwidth):
    a_width = len(array_2d[0])
    a_height = len(array_2d)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX