log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class log(Operation):
"""Computes the natural logarithm of x element-wise.
"""
def __init__(self, x):
"""Construct log
Args:
x: Input node
"""
super().__init__([x])
def compute(self, x_value):
"""Compute the output of the log operation
Args:
x_value: Input value
"""
return np.log(x_value)
Enter to Rename, Shift+Enter to Preview