| 684 | } |
| 685 | |
| 686 | void module::rename_parameter(instruction_ref ins, const std::string& name) |
| 687 | { |
| 688 | impl->changed.notify(); |
| 689 | assert(ins->name() == "@param"); |
| 690 | auto op = any_cast<builtin::param>(ins->get_operator()); |
| 691 | op.parameter = name; |
| 692 | auto outputs = ins->outputs(); |
| 693 | *ins = instruction{op, ins->get_shape(), {}}; |
| 694 | for(auto output : outputs) |
| 695 | ins->add_output(output); |
| 696 | } |
| 697 | |
| 698 | std::unordered_map<std::string, shape> module::get_parameter_shapes() const |
| 699 | { |