nuclearboy95 / anomaly-detection-deep-svdd-tensorflow Goto Github PK
View Code? Open in Web Editor NEWTensorflow Implementation of Deep SVDD
Tensorflow Implementation of Deep SVDD
Hi,
Thanks for your implementaion of the deep svdd. Could you show us the average auc score of your implementation on cifar10. I think it's also very important for others to reuse your work.
Regards,
fsk
Hi,
Thanks for your implementaion of the deep svdd.
I have a question for implementation of the Deep-SVDD loss function in this code.
I think the "class DeepSVDD (line29-line36)" in 'dsvdd.deepSVDD' denote the two diiferent loss function for Deep-SVDD.
with task('Build graph'):
self.x = tf.placeholder(tf.float32, [None] + list(input_shape))
self.latent_op = self.keras_model(self.x)
self.dist_op = tf.reduce_sum(tf.square(self.latent_op - self.c), axis=-1)
if self.objective == 'soft-boundary':
self.score_op = self.dist_op - self.R ** 2
penalty = tf.maximum(self.score_op, tf.zeros_like(self.score_op))
self.loss_op = self.R ** 2 + (1 / self.nu) * penalty
else: # one-class
self.score_op = self.dist_op
self.loss_op = self.score_op
opt = tf.train.AdamOptimizer(lr)
self.train_op = opt.minimize(self.loss_op)
but this function's objective function looks different from the paper's equation (3) and equation (4) which is missing the network weight decay regularizer.
Is it a right implementation for eq(3) and eq(4)? Or "the network weight decay is exist at other part of the code which
was ignored by me.
Thanks again!
Sincerely!
Hi,
I would like to test your algorithm for anomaly detection.Could you define the arguments needed by DeepSVDD, especially "input_shape" and "representation_dim" so that I can pass adequate arguments.
Regards
Extract from deepSVDD.py :
class DeepSVDD:
def init(self, keras_model, input_shape=(28, 28, 1), objective='one-class',
nu=0.1, representation_dim=32, batch_size=128, lr=1e-3):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.