Coder Social home page Coder Social logo

对抗训练tf2 about unif HOT 5 OPEN

luoda888 avatar luoda888 commented on August 15, 2024
对抗训练tf2

from unif.

Comments (5)

luoda888 avatar luoda888 commented on August 15, 2024

PGD 与 FGM都能正常work,但是FreeLB和Yopo、Smart这些不知道该咋改成tf2版本。感觉TF2版本是可以即插即用的,在keras模型定义层,用ADV_MODEL替换Model就好

from unif.

geyingli avatar geyingli commented on August 15, 2024

谢谢你的提问。tf2出来以后我本人一直是持观望态度的,依然在使用tf.compat.v1的api,使用静态图。所以具体地,代码上如何实现,的确是没办法给出什么建议的。但既然你会写PGD和FGM,在这基础上修改,写出FreeLB和SMART我想应该是不难的,不妨花点时间读一读论文的伪代码或UNIF的实现,尝试一下~

from unif.

geyingli avatar geyingli commented on August 15, 2024

回一下第一个问题,restore_grad肯定是要有的,r的实现其实是自定义一个随机变量作为r,不难。另外,无论是我这里的实现,还是别人用pytorch的实现,FreeAT是公认效果比较差的,时间急切的话可以先放弃哈

from unif.

luoda888 avatar luoda888 commented on August 15, 2024

感谢,除了FreeLB和SMART、Yopo,您还有什么推荐的对抗学习的算法么

from unif.

geyingli avatar geyingli commented on August 15, 2024

对抗式学习的主流算法就是这几个了,在GLUE榜单上你可以看到。但是我有一段时间没有看论文了,不排除有更好的对抗式学习算法诞生的可能。按照表现设置优先级,SMART > FreeLB > Yopo > PGD > FGM

from unif.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.