GithubHelp home page GithubHelp logo

repmlp's People

Contributors

dingxiaoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

repmlp's Issues

把merge CNN into FC是完全等价的吗?

把merge CNN into FC是完全等价的吗?
还是像formulation部分说的一种输入输出维度相同的替换?
如果是完全等价,可否在训练阶段也去掉CNN?

Not all CNN blocks are converted

self.conv_embedding = conv_bn_relu(in_channels, channels[0], kernel_size=patch_size, stride=patch_size, padding=0)

The first embedding layer is still CNN without conversion to MLP finally, have you tried to convert this embedding layer to MLP as well?

How to convert the 1D model of RepMLP [B, C, H]

Thank you very much for proposing an excellent model and sharing it publicly. Also congratulations on the publication of your results in CVPR. Since I want the RepMLP model should be on one-dimensional data, that is, the input is only [B, C, H]. Would like to ask if it is possible to provide a RepMLP model for such one-dimensional data?

提问:Cifar10的训练集合和测试集合的划分标准

丁学长您好,之前看到您在文章中写到使用Cifar数据集来进行一致性的验证。
我想复现一下这个结果,但是Readme中好像并没有告知关于Cifar训练集和测试集的切分细节,以及它的输入维度。
这个能告知一下吗?

Why not keep repmlp-resnet?

This design of repmlp-resnet is different from the lastest repmlpnet, and it shows great face recognition accuracy.

why not keep repmlp-resnet in this repo?

请教一点代码问题

关于在单位阵上做卷积,单位阵里有很多0啊,局部信息不会丢失嘛,(还是我理解错了)
比如这段代码里:

def _convert_conv_to_fc(self, conv_kernel, conv_bias):

假设输入就是(1,1,3,3), groups=1, c_in=c_out=1, 就是简单地在一张(3,3)的图上做一个3x3卷积。
I = torch.eye(9).repeat(1,1).reshape(9,1,3,3)
I = tensor([[[[1., 0., 0.],
[0., 0., 0.],
[0., 0., 0.]]],
[[[0., 1., 0.],
[0., 0., 0.],
[0., 0., 0.]]],
[[[0., 0., 1.],
[0., 0., 0.],
[0., 0., 0.]]],
[[[0., 0., 0.],
[1., 0., 0.],
[0., 0., 0.]]],
[[[0., 0., 0.],
[0., 1., 0.],
[0., 0., 0.]]],
[[[0., 0., 0.],
[0., 0., 1.],
[0., 0., 0.]]],
[[[0., 0., 0.],
[0., 0., 0.],
[1., 0., 0.]]],
[[[0., 0., 0.],
[0., 0., 0.],
[0., 1., 0.]]],
[[[0., 0., 0.],
[0., 0., 0.],
[0., 0., 1.]]]])

在这个上面做卷积,I的形状是(9,1,3,3),每个(3,3)中只有一个值不为0,卷积后reshape回去,也只有对角元上不为0,这样做(9,9)x(9,1)的矩阵乘的话,相当与给(3,3)里的每一个元素乘了一个单独的值,也不是卷积吧。

Light Block is only 10% faster than Bottleneck?

Light Block is not fast as the paper says

def test(network, p=True):
    x = torch.ones(128, 3, 224, 224).cuda()
    model = network.cuda()
    if p: print(model)
    model.eval()
    with torch.no_grad(): 
        # warm iters
        for i in range(20):
            y = model(x)
        # inference test 
        iters = 50
        start = time.time()
        for i in range(iters):
            y = model(x)
        end = time.time()
        print((end-start)/iters, 's')
    print(y.shape)

if __name__ == "__main__":
    torch.backends.cudnn.benchmark=True
    test(create_RepMLPRes50_Base_224(deploy=True), False)
    test(create_RepMLPRes50_Light_224(deploy=True), False)
    test(create_RepMLPRes50_Bottleneck_224(deploy=True), False)

with Titan XP

Base: 17.1 ms
Light Block: 16.9 ms
Bottleneck: 18.6 ms 

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.