Giter Site home page Giter Site logo

I've been stuck on the first epoch in a tiny model for 8+ hours using 300 5s spectrograms for training. Is this normal? about ssast HOT 3 CLOSED

yuangongnd avatar yuangongnd commented on August 20, 2024
I've been stuck on the first epoch in a tiny model for 8+ hours using 300 5s spectrograms for training. Is this normal?

from ssast.

Comments (3)

michaelschwob avatar michaelschwob commented on August 20, 2024

I think I see the issue. In ast_models.py, in the pretrain_stage==True loop, we compute

self.p_f_dim, self.p_t_dim = self.get_shape(fstride, tstride, input_fdim, input_tdim, fshape, tshape)
num_patches = self.p_f_dim * self.p_t_dim
self.num_patches = num_patches

which results in self.num_patches=24, which is then passed to gen_maskid_patch() as sequence_len. Because mask_size=400 in run.sh, the following loop is infinite:

while len(list(set(mask_id))) <= mask_size:
            start_id = randrange(sequence_len)

            # this improves the efficiency, but might change the pretrained model
            # while start_id in mask_id:
            #     start_id = randrange(sequence_len)

            cur_mask = []
            for i in range(0, cur_clus):
                for j in range(0, cur_clus):
                    mask_cand = start_id + self.p_t_dim * i + j
                    if mask_cand > 0 and mask_cand < sequence_len:
                        cur_mask.append(mask_cand)
            mask_id = mask_id + cur_mask

So, is the solution to simply reduce mask_patch in run.sh file? What exactly are the consequences in reducing the mask_patch to (for example) 10?

from ssast.

YuanGongND avatar YuanGongND commented on August 20, 2024

please check the paper. The masked patch should be something 50%-80% of the total #patch.

You are running it on CPU (Intel UHD and AMD GPUs do not support cuda). So it will be slow anyways. Maybe training on colab (GPU) is a better idea, even with the free plan.

-Yuan

from ssast.

michaelschwob avatar michaelschwob commented on August 20, 2024

This answers my question; thank you so much for your help, Yuan! I suggest mentioning that mask_patch should also be modified in the src/pretrain/run_mask_{frame,patch}.sh files. At the moment, in your "Pretrain on custom dataset" section, you do not include this as a parameter to be modified. Additionally, we would need to modify the --n_class and --label-csv arguments in the terminal command.

from ssast.

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.