Unverified Commit 18e06438 authored by Karmel Allison's avatar Karmel Allison Committed by GitHub
Browse files

Adding cast to fp32 for TensorRT no image case (#3917)

* Adding cast to fp32

* Adding myself to OWNERS
parent b6bcc450
......@@ -39,6 +39,7 @@
/research/swivel/ @waterson
/research/syntaxnet/ @calberti @andorardo @bogatyy @markomernick
/research/tcn/ @coreylynch @sermanet
/research/tensorrt/ @karmel
/research/textsum/ @panyx0718 @peterjliu
/research/transformer/ @daviddao
/research/video_prediction/ @cbfinn
......
......@@ -118,7 +118,8 @@ def batch_from_random(batch_size, output_height=224, output_width=224,
[batch_size, output_height, output_width, num_channels]
"""
shape = [batch_size, output_height, output_width, num_channels]
return np.random.random_sample(shape)
# Make sure we return float32, as float64 will not get cast automatically.
return np.random.random_sample(shape).astype(np.float32)
################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment