GithubHelp home page GithubHelp logo

Comments (5)

dinghuanghao avatar dinghuanghao commented on May 2, 2024 1

The problem you mentioned above has been fixed, but there is still a reshape problem, which is temporarily not supported.

        bn1 = self.bn1(fc1)
        reshape_2 = bn1.reshape(47, 16, 1024)
        lstm = self.lstm(reshape_2)

752 is reshaped to 47 and 16. If pruning dim0, then 16 adjacent neurons need to be deleted at one time. If pruning dim1, 47 equidistant neurons need to be deleted at one time. Pruning of this complex strategy is already under development, and we will provide a usable version as soon as possible.

from tinyneuralnetwork.

peterjc123 avatar peterjc123 commented on May 2, 2024

@dinghuanghao

from tinyneuralnetwork.

dinghuanghao avatar dinghuanghao commented on May 2, 2024

If possible, please generate model code for me to debug, methods as below:

import torch
import torchvision

from tinynn.graph.tracer import model_tracer, trace

with model_tracer():
    model = torchvision.models.alexnet()  # your model
    model.eval()

    dummy_input = torch.rand((1, 3, 224, 224))
    graph = trace(model, dummy_input)
    graph.generate_code('my_alexnet.py', 'my_alexnet.pth', 'Alexnet')

from tinyneuralnetwork.

juyenshun avatar juyenshun commented on May 2, 2024

Hi,
I wrote a test model to duplicate this problem, and follow the instruction to generate model code.
However, it seems that the pth file is too large to upload, please run the prune_test.py and generate it. Thanks

prune_test20220418_1.zip

from tinyneuralnetwork.

dinghuanghao avatar dinghuanghao commented on May 2, 2024

The latest version already supports reshape, permute, transpose and other operators

from tinyneuralnetwork.

Related Issues (20)

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.