Loading...
Searching...
No Matches
tiny_dnn::core::nnp_backend Class Reference
Inheritance diagram for tiny_dnn::core::nnp_backend:
[legend]
Collaboration diagram for tiny_dnn::core::nnp_backend:
[legend]

## Public Member Functions

| nnp_backend (conv_params *params, std::function< void(const tensor_t &)> f1, conv_layer_worker_specific_storage *ptr)
| nnp_backend (deconv_params *params)
| nnp_backend (maxpool_params *params)
| nnp_backend (fully_params *params)
void | conv2d (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | conv2d_q (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | conv2d_eq (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | conv2d (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
void | conv2d_q (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
void | deconv2d (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | deconv2d_q (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | deconv2d_eq (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | deconv2d (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
void | deconv2d_q (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
void | maxpool (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | maxpool (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
void | fully (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | fully_q (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | fully_eq (const std::vector< tensor_t * > &in_data, std::vector< tensor_t * > &out_data) override
void | fully (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
void | fully_q (const std::vector< tensor_t * > &in_data, const std::vector< tensor_t * > &out_data, std::vector< tensor_t * > &out_grad, std::vector< tensor_t * > &in_grad) override
backend_t | type () const override
Public Member Functions inherited from tiny_dnn::core::backend
| backend (context *ctx_=nullptr)
context * | get_context () const
void | set_layer (layerptr_t layer)

## Additional Inherited Members

Protected Attributes inherited from tiny_dnn::core::backend
context * | ctx_
layerptr_t | layer_

## Member Function Documentation

## conv2d() [1/2]

void tiny_dnn::core::nnp_backend::conv2d | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## conv2d() [2/2]

void tiny_dnn::core::nnp_backend::conv2d | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## conv2d_eq()

void tiny_dnn::core::nnp_backend::conv2d_eq | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## conv2d_q() [1/2]

void tiny_dnn::core::nnp_backend::conv2d_q | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## conv2d_q() [2/2]

void tiny_dnn::core::nnp_backend::conv2d_q | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## deconv2d() [1/2]

void tiny_dnn::core::nnp_backend::deconv2d | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## deconv2d() [2/2]

void tiny_dnn::core::nnp_backend::deconv2d | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## deconv2d_eq()

void tiny_dnn::core::nnp_backend::deconv2d_eq | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## deconv2d_q() [1/2]

void tiny_dnn::core::nnp_backend::deconv2d_q | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## deconv2d_q() [2/2]

void tiny_dnn::core::nnp_backend::deconv2d_q | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## fully() [1/2]

void tiny_dnn::core::nnp_backend::fully | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## fully() [2/2]

void tiny_dnn::core::nnp_backend::fully | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## fully_eq()

void tiny_dnn::core::nnp_backend::fully_eq | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## fully_q() [1/2]

void tiny_dnn::core::nnp_backend::fully_q | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## fully_q() [2/2]

void tiny_dnn::core::nnp_backend::fully_q | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## maxpool() [1/2]

void tiny_dnn::core::nnp_backend::maxpool | ( | const std::vector< tensor_t * > & | in_data,
|  | const std::vector< tensor_t * > & | out_data,
|  | std::vector< tensor_t * > & | out_grad,
|  | std::vector< tensor_t * > & | in_grad
| ) |  |

inline override virtual

Implements tiny_dnn::core::backend.

## maxpool() [2/2]

void tiny_dnn::core::nnp_backend::maxpool | ( | const std::vector< tensor_t * > & | in_data,
|  | std::vector< tensor_t * > & | out_data
| ) |  |

inline override virtual

if (params_m_->stride_x != 2 || params_m_->stride_y != 2) { throw nn_error("NNPACK Max-Pool requires a stride == 2."); }

if (params_m_->pool_size_x != 2 || params_m_->pool_size_y != 2) { throw nn_error("NNPACK Max-Pool requires a pool size == 2."); }

const tensor_t& in = *in_data[0]; tensor_t& a = *out_data[1];

kernels::nnp_maxpool_kernel(*params_m_, in, a);

Implements tiny_dnn::core::backend.

## type()

backend_t tiny_dnn::core::nnp_backend::type | ( |  | ) | const

inline override virtual

Implements tiny_dnn::core::backend.

The documentation for this class was generated from the following file:

- tiny_dnn/core/backend_nnp.h