17 #include <../api/CPP/cldnn_defs.h> 18 #include <../api/CPP/engine.hpp> 19 #include <../api/CPP/input_layout.hpp> 20 #include <../api/CPP/activation.hpp> 21 #include <../api/CPP/softmax.hpp> 22 #include <../api/CPP/memory.hpp> 23 #include <../api/CPP/fully_connected.hpp> 24 #include <../api/CPP/data.hpp> 25 #include <../api/CPP/topology.hpp> 28 #include "helper_functions.h" 38 using namespace cldnn;
42 std::cout << std::endl <<
"-- Chapter 2 --" << std::endl;
64 set_values(weights_mem, { 1.5f, 1.0f, 0.5f, -1.0f, 0.0f, 0.5f, 0.5f, -0.5f, -2.0f });
66 data fc_weights(
"fc_weights", weights_mem);
71 set_values(bias_mem, { 0.0f, 1.0f, 0.5f });
73 data fc_bias(
"fc_bias", bias_mem);
98 std::cout <<
"Topology contains:" << std::endl;
99 for (
auto it :
topology.get_primitive_ids())
101 std::cout << it << std::endl;
Activation using rectified linear unit or parameterized rectified linear unit.
Performs forward fully connected layer (inner product). Also supports built-in Relu cldnn_activation_...
N-dimensional vector. Mostly used to represent memory size.
Provides input data to topology.
Network topology to be defined by user.
void add(PType const &desc)
Adds a primitive to topology.
static memory allocate(const engine &engine, const layout &layout)
Allocate memory on engine using specified layout.
Normalizes results so they sum to 1.
Represents clDNN engine object.