Comments (1)
All of these permutations you're describing are sensible options, and I'm not aware of any good reason to decide one way vs the other, aside from checking empirically what works the best. It will also probably depend on the data.
from blog_code.
Related Issues (3)
- Difficulty in understanding xent function HOT 1
- i have an error in 'Jp = xent(predp, labels).mean() + wd_term'. (IndexError Traceback (most recent call last) Cell In[52], line 1 ----> 1 dW_approx = get_grads((gcn1_out,), sm1, "W", labels, eps=1e-4, wd=opt.wd) 2 db_approx = get_grads((gcn1_out,), sm1, "b", labels, eps=1e-4, wd=opt.wd) Cell In[50], line 16 14 wd_term = wd/2*(cp_flat**2).sum() / labels.shape[0] 15 #print(wd_term) ---> 16 Jp = xent(predp, labels).mean() + wd_term 18 # J(theta - eps) 19 cp_flat[i] = theta - eps Cell In[47], line 8 7 def xent(pred, labels): #fonction de perte d'entropie croisée ----> 8 return -np.log(pred)[np.arange(pred.shape[0]), np.argmax(labels, axis=1)] IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (34,) (5,) ) HOT 1
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 blog_code.