Skip to content

Commit 7c1a145

Browse files
authored
add resnet34 (wang-xinyu#741)
* hello * add resnet34
1 parent 9fefbed commit 7c1a145

File tree

3 files changed

+366
-3
lines changed

3 files changed

+366
-3
lines changed

resnet/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ add_executable(resnet18 ${PROJECT_SOURCE_DIR}/resnet18.cpp)
2121
target_link_libraries(resnet18 nvinfer)
2222
target_link_libraries(resnet18 cudart)
2323

24+
add_executable(resnet34 ${PROJECT_SOURCE_DIR}/resnet34.cpp)
25+
target_link_libraries(resnet34 nvinfer)
26+
target_link_libraries(resnet34 cudart)
27+
2428
add_executable(resnet50 ${PROJECT_SOURCE_DIR}/resnet50.cpp)
2529
target_link_libraries(resnet50 nvinfer)
2630
target_link_libraries(resnet50 cudart)

resnet/README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Following tricks are used in this resnet, nothing special, residual connection a
1313
## TensorRT C++ API
1414

1515
```
16-
// 1a. generate resnet18.wts or resnet50.wts from [pytorchx/resnet](https://github.com/wang-xinyu/pytorchx/tree/master/resnet)
16+
// 1a. generate resnet18.wts,resnet34.wts or resnet50.wts from [pytorchx/resnet](https://github.com/wang-xinyu/pytorchx/tree/master/resnet)
1717
1818
// 1b. generate wide_resnet50.wts from [BlueMirrors/torchtrtz](https://github.com/BlueMirrors/torchtrtz)
1919
20-
// 2. put resnet18.wts or resnet50.wts into tensorrtx/resnet
20+
// 2. put resnet18.wts,resnet34 or resnet50.wts into tensorrtx/resnet
2121
2222
// 3. build and run
2323
@@ -34,6 +34,10 @@ make
3434
sudo ./resnet18 -s // serialize model to plan file i.e. 'resnet18.engine'
3535
sudo ./resnet18 -d // deserialize plan file and run inference
3636
37+
or
38+
sudo ./resnet34 -s // serialize model to plan file i.e. 'resnet34.engine'
39+
sudo ./resnet34 -d // deserialize plan file and run inference
40+
3741
or
3842
3943
sudo ./resnet50 -s // serialize model to plan file i.e. 'resnet50.engine'
@@ -51,7 +55,7 @@ sudo ./wide_resnet50 -d // deserialize plan file and run inference
5155
5256
5357
// 4. see if the output is same as
54-
- [pytorchx/resnet](https://github.com/wang-xinyu/pytorchx/tree/master/resnet) - for resnet18, resnet50, resnext50
58+
- [pytorchx/resnet](https://github.com/wang-xinyu/pytorchx/tree/master/resnet) - for resnet18, resnet34, resnet50, resnext50
5559
- [BlueMirrors/torchtrtz](https://github.com/BlueMirrors/torchtrtz) - for wide_resnet50
5660
```
5761

0 commit comments

Comments
 (0)