Comments (2)
Intel(R) DAAL provides the ability to get the value of the loss function for every batch.
And based on this value you can define any stopping criteria you like.
Please make the following modifications to the sample to access the value of the loss function.
First, save the identifier of the loss layer when initializing the topology of a network.
Please add following global variable into the sample:
LayerIds layerIds;
This variable will hold the identifiers of all layers in the topology.
Second, change the line that creates the topology by providing the storage for layers' identifiers:
/* Configure the neural network topology */
topology = configureNet(&layerIds);
And third, here is the code that prints the value of the loss function after compute() step on the local nodes.
/* Perform forward and backward pass through the neural network to compute weights and biases derivatives on worker node */
netLocal->compute();
/* Get the model of the neural network on local node */
training::ModelPtr trainingModel = netLocal->input.get(training::inputModel);
/* Get the result of the loss layer */
services::SharedPtr<layers::forward::Result> lossLayerResult = trainingModel->getForwardLayer(layerIds.sm)->getLayerResult();
/* Print the value computed by the loss layer */
printTensor(lossLayerResult->get(layers::forward::value), "loss value: ");
Regarding the "accuracyThreshold" parameter of the optimization solver.
The present version of the library does not use this parameter for the neural network training.
We investigate the options for adding support of accuracy threshold to the neural network training algorithm to have its behavior more configurable in the future releases of the library.
Best regards,
Victoriya
from onedal.
Thanks a lot for the tip!
Will an option for calculating one single loss on master node (ie., netMaster) be also investigated? The option can be a big convenience, especially for topologies with many worker nodes.
from onedal.
Related Issues (20)
- Improvements in cmake configuration HOT 2
- Makefile build against official MKL and TBB possible? HOT 3
- Issues with the makefile - what about a cmake based build system? HOT 2
- Can not deploy an application that is dynamically linked against oneDAL HOT 6
- How to make a debug build (missing daal_vmlipp_cored.lib)? HOT 7
- Feature request: Add support for ClangCl on MSVC HOT 4
- Looking forward to kd-tree implementation.. HOT 1
- Support for accelerating NGBoost HOT 1
- Compile Failure: "No kernel name provided without -fsycl-unnamed-lambda enabled!" HOT 2
- Support for RISC-V architecture HOT 1
- Error in running daal c++ examples HOT 4
- Datasets used for producing speedup benchmarks in scikit-learn intelex HOT 1
- Remote branch develop not found in upstream origin HOT 2
- `xsyrk` vs `xxsyrk` vs `dsyrk` (in netlib LAPACK) HOT 4
- PCA tests fail periodically.
- Not able to build daal/cpp examples HOT 3
- How to validate results when adding a new backend (i.e., OpenBLAS, Lapack, etc) HOT 1
- Differences betwen SPBLAS - xcsrmultd & xcsrmm ? HOT 1
- How to perform LightGBM inference in online mode using c++? HOT 7
- Fatal error: stdlib.h: No such file or directory from #include_next <stdlib.h> HOT 2
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 onedal.