Comments (9)
Hello Florian,
Could you provide a couple of examples for the resulting object you are asking for using different shapes of the tensors contained in vector<Tensor *>?
Best Regards,
Jon
from eddl.
Hello Jon.
Actually what I would like to do something like that
[...]
model_ = import_net_from_onnx_file(params.modelPath);
eddl::build(model_);
[...]
Tensor* x = new Tensor({x1, x2, x3, x4, x5}, {1, 5});
vector<Tensor*> y = model_->predict({x});
vector<double> weights;
weights = y.to_vector(); <<< **this is where I am stuck right now**
std::discrete_distribution<> d(weights.begin(), weights.end());
std::random_device rd;
auto ctrl_idx = d(rd);
[...]
BR, Florian
from eddl.
Hi, i have just implemented a new function: to_std(), an example:
t1 = Tensor::ones({5, 1});
std::vector vf=t1->to_std();
The result is a std_vector that maps the same memory of the tensor. Obviously the tensor could have several dimensions but std_vector is just a vector but all the values are there in a row-wise order.
Rigth now is a std_vector of floats. If you need doubles then it would be different since internal tensor pointer (and values) is a float pointer. But just try with this solution and let us know.
from eddl.
Thanks a lot. I'll try.
BR, Florian
from eddl.
Hi Florian,
Just one additional question, do you download the master branch and compile the EDDL from the source code? Or do you need us to release a new version with this newly added feature?
Regards,
Jon
from eddl.
Hi Jon,
so far we used build our docker container using one of your releases (by calling wget https://github.com/deephealthproject/eddl/archive/refs/tags/v1.1b.tar.gz). The best for us would be if you could provide another release - then rebuilding our container should be easy.
BR, Florian
from eddl.
I will do it asap and notify you, but you have to use a new tag.
from eddl.
Hi again,
@FlorianThaler you can now check the new tag with the new feature: https://github.com/deephealthproject/eddl/archive/refs/tags/v1.2b.tar.gz
Regards,
Jon
from eddl.
Great, thanks.
from eddl.
Related Issues (20)
- Fallback of unsupported args for ONNX
- Load dynamic inputs shapes from ONNX
- Add Tile layer and Broadcast HOT 1
- Allow asymmetric padding in ONNX
- Add the name_id of each layer
- Different training results with Keras and EDDL
- The examples should be intendeed for begineers, not for testing internals.
- Avoid printing to standard output HOT 1
- Support n-dimensional dense HOT 1
- Add preprocessor directives for FPGA
- Download model params are not consistent with keras.
- Problem in deserialization of an ONNX model HOT 1
- Segmentation fault in eddl.forward() with a LSTM layer HOT 3
- non-recurrent LSTM cells with multiple GPUs HOT 1
- Import ONNX file with a different input channel dimension HOT 1
- Import ONNX with low_memory setting HOT 1
- LSTM training fail on single GPU, but not with multiple GPUs HOT 4
- Export to ONNX randomly fails HOT 9
- Import ONNX model from pytorch - LDense only works over 2D tensors (LDense) HOT 6
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 eddl.