| 1724 | } |
| 1725 | |
| 1726 | void cropInit(XlayerData *xlayer_seq, xChangeLayer *currentLayer) |
| 1727 | { |
| 1728 | #if EN_DEBUG_INIT_PRINT |
| 1729 | cout<<"cropInit Start : "<<endl; |
| 1730 | #endif |
| 1731 | |
| 1732 | int axis = xlayer_seq->hw_ops->crop_params->axis; |
| 1733 | int offset = xlayer_seq->hw_ops->crop_params->offset; |
| 1734 | |
| 1735 | vector<int> bottomShape = xlayer_seq->hw_ops->bottomShape.at(0);//.blob->shape; |
| 1736 | vector<int> topShape = xlayer_seq->hw_ops->topShape.at(0);//.blob->shape; |
| 1737 | |
| 1738 | int *scalar_crop_args = (int *)currentLayer->params; |
| 1739 | |
| 1740 | printShape(bottomShape); |
| 1741 | |
| 1742 | |
| 1743 | scalar_crop_args[0] = bottomShape.at(1); //in_depth |
| 1744 | scalar_crop_args[1] = bottomShape.at(2); //input_h |
| 1745 | scalar_crop_args[2] = bottomShape.at(3); //input_w |
| 1746 | |
| 1747 | printShape(topShape); |
| 1748 | |
| 1749 | scalar_crop_args[3] = topShape.at(1); //out_depth |
| 1750 | scalar_crop_args[4] = topShape.at(2); //output_h |
| 1751 | scalar_crop_args[5] = topShape.at(3); //output_w |
| 1752 | |
| 1753 | scalar_crop_args[6] = axis; |
| 1754 | scalar_crop_args[7] = offset; |
| 1755 | |
| 1756 | #if EN_DEBUG_INIT_PRINT |
| 1757 | for(int i=0;i<MAX_PARAM_SIZE;i++) |
| 1758 | { |
| 1759 | fprintf(stderr,"\t%d", scalar_crop_args[i]); |
| 1760 | } |
| 1761 | #endif |
| 1762 | |
| 1763 | |
| 1764 | currentLayer->kernType = CROP; |
| 1765 | |
| 1766 | #if EN_DEBUG_INIT_PRINT |
| 1767 | cout<<"cropInit End : "<<endl; |
| 1768 | #endif |
| 1769 | } |
| 1770 | |
| 1771 | void eltwiseaddInit(XlayerData *xlayer_seq, xChangeLayer *currentLayer) |
| 1772 | { |
no test coverage detected