How to write the hinge loss L in paddle?
Created by: cactiball
I want to compute the hinge loss like: sim = cos(a, b) L = max(0, sim)
I could use "math.relu(0, sim)" before, but in the current version math.py is renamed to layer_math.py. When I use "layer_math.relu(0, sim)", I get:
Python Error: <type 'exceptions.AttributeError'> : 'module' object has no attribute 'relu' Python Callstack: /usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py : 3530 /usr/local/lib/python2.7/dist-packages/paddle/trainer/config_parser.py : 3523
How should I do this operation in current code base?