UNet support TensorRT 8.x (#1245)
* TensorRT 8.x supported * Unet TensorRT 8.x supported, add Contributors nengwp --------- Co-authored-by: nengwp <nengwp@github.ai>
This commit is contained in:
parent
f92dcf43dc
commit
ef22b1d03b
@ -8,12 +8,13 @@ Pytorch model from [Pytorch-UNet](https://github.com/milesial/Pytorch-UNet).
|
||||
<a href="https://github.com/East-Face"><img src="https://avatars.githubusercontent.com/u/35283869?v=4s=48" width="40px;" alt=""/></a>
|
||||
<a href="https://github.com/irvingzhang0512"><img src="https://avatars.githubusercontent.com/u/22089207?s=48&v=4" width="40px;" alt=""/></a>
|
||||
<a href="https://github.com/wang-xinyu"><img src="https://avatars.githubusercontent.com/u/15235574?s=48&v=4" width="40px;" alt=""/></a>
|
||||
<a href="https://github.com/nengwp"><img src="https://avatars.githubusercontent.com/u/44516353?s=96&v=4" width="40px;" alt=""/></a>
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
Please use TensorRT 7.x.
|
||||
|
||||
There is a bug with TensorRT 8.x, we are working on it.
|
||||
Now TensorRT 8.x is supported and you can use it.
|
||||
The key cause of the previous bug is the pooling layer Stride setting problem.
|
||||
|
||||
## Build and Run
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ ILayer* doubleConv(INetworkDefinition* network, std::map<std::string, Weights>&
|
||||
|
||||
ILayer* down(INetworkDefinition* network, std::map<std::string, Weights>& weightMap, ITensor& input, int outch, int p, std::string lname) {
|
||||
IPoolingLayer* pool1 = network->addPoolingNd(input, PoolingType::kMAX, DimsHW{ 2, 2 });
|
||||
pool1->setStrideNd(DimsHW{ 2, 2 });
|
||||
assert(pool1);
|
||||
ILayer* dcov1 = doubleConv(network, weightMap, *pool1->getOutput(0), outch, 3, lname + ".maxpool_conv.1", outch);
|
||||
assert(dcov1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user