Comments (3)
Sorry, what do you mean with Demo?
from ganbert-pytorch.
Sorry, what do you mean with Demo?
I want to show the results after training model on unlabeled dataset with actual data (Example : What does CNN stand for ? -> Result after classified is: ABBR:exp) . Also, Whether i can put some new data has not yet encountered for model predict ?
from ganbert-pytorch.
In the python book you can find
# Evaluate data for one epoch
for batch in test_dataloader:
# Unpack this training batch from our dataloader.
b_input_ids = batch[0].to(device)
b_input_mask = batch[1].to(device)
b_labels = batch[2].to(device)
# Tell pytorch not to bother with constructing the compute graph during
# the forward pass, since this is only needed for backprop (training).
with torch.no_grad():
model_outputs = transformer(b_input_ids, attention_mask=b_input_mask)
hidden_states = model_outputs[-1]
_, logits, probs = discriminator(hidden_states)
###log_probs = F.log_softmax(probs[:,1:], dim=-1)
filtered_logits = logits[:,0:-1]
If you just take the maximum value in filtered_logits
you have the class.
Hope it helps
Danilo
from ganbert-pytorch.
Related Issues (20)
- Number of discriminator output HOT 1
- Is it possible to obtain the text representation generated fake examples? HOT 1
- how do we use the trained model HOT 1
- Support for validation set instead of evaluating on test set directly. HOT 3
- Is the number of unlabeled examples related to the model accuracy? HOT 1
- Train Accuracy in evaluation mode is decreased by every epoch HOT 1
- Generator doesn't work HOT 2
- Gan BERT for Multilabel Intent Classification HOT 1
- Unable to reproduce the results for 20-News dataset HOT 2
- Saving Best model during training
- Deploy the model to use with live data
- Normal distibution HOT 1
- Electra support HOT 2
- Feature matching loss HOT 1
- Accuracy problem HOT 1
- do you have tensorflow code?thankyou HOT 1
- Save and deploy Model HOT 1
- Model errors when tried to change the dataset HOT 2
- Calculate F1 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 ganbert-pytorch.