Comments (6)
Hi @buxuewushu1314 I just tested the viz code, but did not encounter this problem. Could you double-check whether you download the cnxL384_withdecoder_1kpretrained_spark_style.pth
file from https://drive.google.com/file/d/1ZI9Jgtb3fKWE_vDFEly29w-1FWZSNwa0/view?usp=share_link ? I think checking the file will solve the issue.
from spark.
When I load xxx__1kpretrained.pth or xxxx_still_pretraining.pth and want to have a look at the performance of my pretrained model, I encounter this problem too. How can I get my xxxx_withdecoder_1kpretrained_spark_style.pth when i pretraining ?
from spark.
I modified the function:build_spark like below
def build_spark(pretraining_pth,spark_model):
pretrained_state = torch.load(pretraining_pth, map_location='cpu')
spark_model.eval(), [p.requires_grad_(False) for p in spark_model.parameters()]
# load the checkpoint
missing, unexpected = spark_model.load_state_dict(pretrained_state['module'], strict=False)
assert len(missing) == 0, f'load_state_dict missing keys: {missing}'
assert len(unexpected) == 0, f'load_state_dict unexpected keys: {unexpected}'
del pretrained_state
return spark
And then it works using xxxx_still_pretraining.pth
ckpt_file = 'your xxxx_still_pretraining.pth path'
spark = 'your spark_model'
spark = build_spark(ckpt_file,spark)
What's more, you may need to modify the function denorm_for_vis in spark.py : 191 if you use your own dataset
from spark.
@syjabc have you solved the issue through your code? I think the new build_spark is doing the right thing, using torch.load('xxxx_still_pretraining', 'cpu')['module']
as torch.load('xxxx_withdecoder_1kpretrained_spark_style', 'cpu')
.
from spark.
I think it has been solved. Learned so much from your code, thanks for your excellent work.
from spark.
Also thank you for helping me to refine this visualisation. In the latest commit 1468df8 i modify the notebook for visualizing your own model.
from spark.
Related Issues (20)
- 小模型自监督效果 HOT 10
- Can not load the pretrained convnext_small model HOT 2
- Spark.forward HOT 1
- infer问题 HOT 3
- There is no activation after the 2nd Conv in each decoder block HOT 1
- Target dataset and augmentation HOT 2
- 对比convnextv2 HOT 1
- reducing pre-training to 200 epochs HOT 9
- Tutorial for finetune on my own dataset HOT 1
- Are there any plans to make a port to tensorflow and Keras? HOT 1
- ImageNet finetuning exploding HOT 9
- there is no requirements.txt file. HOT 1
- SparK for semantic segmentation HOT 3
- Resuming ImageNet fine-tuning HOT 2
- About sparse convolution HOT 4
- How to transfer this method to 3D situation. HOT 1
- ConvNext B for reconstruct images HOT 3
- recommend a great library designed for sparse tensors HOT 1
- Can SparK be used for few-shot learning? HOT 2
- SparseBatchNorm2d can not mask correctly ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark.