I want to get the output of a keras layer which is a tensor of images, convert it to numpy arrays and apply a custom function on them without using backend functions, and return the output to the model. So it would be something like this:
def sum(args):
# convert args to numpy arrays
???
#calculating sum of all the elements
s=np.sum(args)
return s
Thank you very much for your help.