Comments (10)
@ys0232 In the latest commit eb0eb94, Forward can support 'Flatten' Op. You could try it. And we'll support tf.depth_to_space
soon.
from forward.
Another unsupport operation is tf.depth_to_space, it in torch is "PixelShuffle". Thanks for helping!
from forward.
Nice work! @yuanzexi
from forward.
There are another "Reshape" pattern like "Flatten". However, it doesn't work in Forward-1.1.0. Please help to support "Reshape" to tensorrt, thanks! Create model code look like this.@yuanzexi
def create_tf_reshape(model_file):
import tensorflow as tf
import tf_slim as slim
with tf.Session() as sess:
x1 = tf.placeholder(shape=(1,None,None,27),dtype=tf.float32, name='x')
#op = slim.flatten(x1)
gs = tf.shape(x1)
op = tf.reshape(x1,shape=(1,gs[1],gs[2],3,9),name='reshape')
sess.run(tf.global_variables_initializer())
feed_dict = {x1: np.ones((1,12,12,27))}
print(sess.run(op, feed_dict))
graphdef = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['reshape'])
tf.train.write_graph(graphdef, './', model_file, as_text=False)
return feed_dict
from forward.
There are another "Reshape" pattern like "Flatten". However, it doesn't work in Forward-1.1.0. Please help to support "Reshape" to tensorrt, thanks! Create model code look like this.@yuanzexi
def create_tf_reshape(model_file): import tensorflow as tf import tf_slim as slim with tf.Session() as sess: x1 = tf.placeholder(shape=(1,None,None,27),dtype=tf.float32, name='x') #op = slim.flatten(x1) gs = tf.shape(x1) op = tf.reshape(x1,shape=(1,gs[1],gs[2],3,9),name='reshape') sess.run(tf.global_variables_initializer()) feed_dict = {x1: np.ones((1,12,12,27))} print(sess.run(op, feed_dict)) graphdef = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['reshape']) tf.train.write_graph(graphdef, './', model_file, as_text=False) return feed_dict
@ys0232 So far, Forward only support DYNAMIC BATCH dim, so using shape=(1, None, None, 27)
as input is invalid.
from forward.
Another unsupport operation is tf.depth_to_space, it in torch is "PixelShuffle". Thanks for helping!
@yuanzexi Could help to support tf.depth_to_space and pytorch.PixelShuffle ?
from forward.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
from forward.
This issue was closed because it has been stalled for 5 days with no activity.
from forward.
@ys0232 Sorry for late reply. tf.depth_to_space and pytorch.PixelShuffle are now supported in Release v1.2.2.
from forward.
This issue was closed because it has been stalled for 5 days with no activity.
from forward.
Related Issues (20)
- 使用这个Forward框架进行推断的时候会有精度损失吗? HOT 6
- 关于fwd-torch的几个路径的问题 HOT 2
- Segmentation fault (core dumped) when transfer keras model to trt. HOT 4
- 编译VC项目时出错 HOT 14
- vs2017怎么跑demo? HOT 8
- Is have docker with all dependencies? HOT 3
- Will forward framework support paddlepaddle in the future? HOT 4
- win_python_keras版本加载模型时报错 HOT 4
- 编译出错 找不到cublas_device库 HOT 7
- keras.layer里Embedding的trt实现 HOT 8
- Keras中Flatten层的支持 HOT 2
- 对‘fwd::TrtForwardEngine::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)’未定义的引用 HOT 9
- 是否考虑重新写一个模型序列化?? HOT 3
- 与trtorch等项目的优劣对比 HOT 3
- make报错 HOT 22
- reflectPad存在两个问题 HOT 9
- 编译fwd-pytroch时提示缺少头文件 HOT 1
- 优化模型时报错 HOT 2
- [TRT] (Unnamed Layer* 0) [Convolution]: at least 4 dimensions are required for input HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forward.