fbuchert / fixmatch-pytorch Goto Github PK
View Code? Open in Web Editor NEWPyTorch implementation of FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
License: MIT License
PyTorch implementation of FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
License: MIT License
Hello,
First off, great work. I have been looking through your code to get ideas on how to implement something similar for a project of mine. I have a question about the last layer of the model and training though.
Do I understand correctly, that the inputs (weak, u_weak, u_strong) are concatenated in the batch dimension, meaning the model input is now [B x 3, C, H, W], and the output also [B x 3, ...] ? There are no other "special" modification to the model itself to produce the correct output?
Best Regards,
L
` logits = model(inputs)
logits_x = logits[:len(x_weak)]
logits_u_weak, logits_u_strong = logits[len(x_weak):].chunk(2)
del inputs
labeled_loss = F.cross_entropy(logits_x, labels, reduction="mean")
with torch.no_grad():
pseudo_labels = torch.softmax(logits_u_weak, dim=1)
max_probs, targets_u = torch.max(pseudo_labels, dim=1)
mask = max_probs.ge(args.threshold).float()`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.