136{
137 planForwardTensors();
138 planBackwardTensors();
139
140 _tensor_builder->allocate();
141 _tensor_builder->allocateBackward();
142
143 auto fn_map = generateFunctionMap();
144
145
149 return;
150
152 assert(tensor != nullptr);
153
154 VERBOSE(FillOperandData) <<
"Fill data for " << ind << std::endl;
155
156 auto data = operand.shareData();
159
160 if (trainable_tensor == nullptr)
161 throw std::runtime_error{"This tensor is not trainable tensor"};
162
164 });
165
166
167 const_cast<ir::train::TrainableGraph &
>(*
_tdata->tgraph)
168 .operands()
170
171
172
173
174
175
176
177
178
179
180 planLayerScopeTensors(fn_map);
181 _tensor_builder->allocateLayerScope();
182
183 return fn_map;
184}
void fillBuffer(const std::shared_ptr< ir::Data > &data)
const TrainableContextData * data() const
const ir::train::TrainableGraph * trainable_graph() const
const util::Set< ir::OperandIndex > & external_operands() const
std::unique_ptr< TrainableContextData > _tdata
const Operands & operands() const override
void iterate(const std::function< void(const Index &, const Object &)> &fn) const
Iterate over the container with given function.
#define VERBOSE(name, lv)
basic::train::TrainableTensor TrainableTensor
::onert::util::Index< uint32_t, OperandIndexTag > OperandIndex