Comments (4)
Dear xwz-123,
thank you for you feedback. We fixed the bug in commit 16140e3
We also tested it with the code and data you provided. The code as is, does not run, as the output shape of the neural networks is a 3D Tensor (due to the embedding layer).
In order for it to work you can use e.g. a nn.Flatten before output layer.
This deep_models_dict should work:
deep_models_dict = {
'd1': {
'model': nn.Sequential(nn.Embedding(num_emb[0], emb_dim[0]), nn.ReLU(),nn.Flatten(start_dim=1), nn.Linear(emb_dim[0], 3)),
'output_shape': 3
},
'd2': {
'model': nn.Sequential(nn.Embedding(num_emb[1], emb_dim[1]), nn.ReLU(),nn.Flatten(start_dim=1), nn.Linear(emb_dim[1], 3)),
'output_shape': 3
}
}
Please check if it works now.
from pysddr.
Dear @DoTha,
thanks for your reply. I've used the code provided by your, but I still get the same error as before, i.e.
Expected tensor for argument #1 'indices' to have one of the following scalar types: Long, Int; but got torch.FloatTensor instead (while checking arguments for embedding)
from pysddr.
Dear @xwz-123
just to be sure: when you say you use the code provided
do you mean that you pulled the latest commit from our git repo,
or do you mean you use the deep_models_dict that I provided?
Because the error that you get should be fixed in our latest commit (the deep_model_dict I provided does NOT fix the bug).
What might also be a problem:
if you installed with pip without the -e flag, then you might (additionally to pulling the latest version of the code) need to uninstall the package and reinstall it again
please tell me if the problem prevails
from pysddr.
@DoTha I've indeed forgotten to pull the latest commit, sorry for my mistake! Now the codes run smoothly. Thanks a lot for your help!
from pysddr.
Related Issues (2)
- Orthogonalization Issue? HOT 4
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 pysddr.