vantage-vision-vv / Anomaly-Detection-in-Surveillance-Videos

Real-World Anomaly Detection in Surveillance Videos
183 stars 53 forks source link

The implementation of loss function #14

Open YuxinZhaozyx opened 5 years ago

YuxinZhaozyx commented 5 years ago

The loss function in your paper is

image

image

However, you implement it in the following way.

https://github.com/abhay97ps/Anomaly-Detection-in-Surveillance-Videos/blob/4be07aba4a8dda7cea882f33782595622d248d3e/Anomaly_NN.py#L51

https://github.com/abhay97ps/Anomaly-Detection-in-Surveillance-Videos/blob/4be07aba4a8dda7cea882f33782595622d248d3e/Anomaly_NN.py#L66-L77

The image is implemented as a placeholder extra and calculated using python float type. Won't it make it impossible to back propagate gradient to extra? And the optimizer only minimizes the image .

Shouldn't the image be implemented in tensorflow functions rather than pure python?

fzp8656342 commented 5 years ago

It seems the weight didn't get update every iteration in here. Have you figure out how to do it correctly?