Poplar and PopLibs
NormaliseImage.hpp
Go to the documentation of this file.
1// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
8#ifndef popops_NormaliseImage_hpp
9#define popops_NormaliseImage_hpp
10#include <poplar/Graph.hpp>
11#include <poplar/Program.hpp>
12
13namespace popops {
14
26 const poplar::ArrayRef<std::size_t> shape,
27 const poplar::DebugContext &debugContext = {});
28
55 poplar::Tensor tIn, float inScale,
56 poplar::Tensor offsets, poplar::Tensor scales,
57 const poplar::DebugContext &debugContext = {});
58
59} // namespace popops
60
61#endif // popops_NormaliseImage_hpp
DebugContext gathers the common external parameters of the context of an operation.
Definition: DebugContext.hpp:221
This class represents a graph program to be executed on the IPU.
Definition: Graph.hpp:52
A reference to a subset of tensor elements.
Definition: Tensor.hpp:38
Class representing device data types.
Definition: Type.hpp:42
Program that executes a sequence of programs.
Definition: Program.hpp:77
Common functions, such as elementwise and reductions.
Definition: AllTrue.hpp:15
poplar::Tensor normaliseImage(poplar::Graph &graph, poplar::program::Sequence &seq, poplar::Tensor tIn, float inScale, poplar::Tensor offsets, poplar::Tensor scales, const poplar::DebugContext &debugContext={})
Pad a tensor to have 4 channel dimensions.
poplar::Tensor createNormaliseImageInput(poplar::Graph &graph, const poplar::Type &type, const poplar::ArrayRef< std::size_t > shape, const poplar::DebugContext &debugContext={})
Add a tensor for a 3-channel image suitable for padding to 4 channels.