Spatial Convolution with FloatTensor works just fine:nn.SpatialConvolution(1,3,3,3):type('torch.FloatTensor'):forward(torch.FloatTensor(1,1,5,5))... (correct output)Spatial Convolution with ByteTensor fails:nn.SpatialConvolution(1,3,3,3):type('torch.ByteTensor'):forward(torch.ByteTensor(1,1,5,5))... (error: torch/install/share/lua/5.1/nn/SpatialConvolution.lua:100: attempt to index field 'THNN' (a nil value).)
Looks like the THNN backend functions are missing for ByteTensor & co.
--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.
You can try few byte-precision modules using this packageit only supports- convolution- maxpool- threshold
Thanks a lot! Have you gone any further than the precision and speed tests with random data?Did you try inference with real weights and images, or have you tried training (e.g. fixed-point fprop, float bprop)?
Am Donnerstag, 3. März 2016 05:22:53 UTC+1 schrieb Jonghoon Jin:
You can try few byte-precision modules using this packageit only supports- convolution- maxpool- threshold
--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/NDhE1ER17sA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.
Hi Min LiI never figured that out. I used Caffe for training, and Ristretto for Quantization (floating-point training -> quantization -> fixed-point inference).I never trained a network in fixed-point format so far.Best regardsDavid
Am 17.07.2017 um 19:11 schrieb 李旻 via torch7 <torch7+APn2wQdFnfJSd3qxDSqp5bVIqac4i0oAa--hYIGUbyEllxNcRMgq4ozqF@googlegroups.com>:
Hi David,--I have read your master thesis <<ZynqNet: An FPGA-Accelerated Embedded Convolutional Neural Network>>, and I am also excited about the implementation of DNN on FPGA. I wonder if you have figured out how to train a fixed-point network on Torch. I'm doing a project about implementing an RNN on FPGA with fixed-point and want to train a quantized RNN on Torch at the first stage.Best regards,Min Li
在 2016年3月2日星期三 UTC-8上午5:01:41,David Gschwend写道:Hi all!I'm currently looking into training networks using fixed-point / integer weights and activations instead of floats (with an FPGA-based accelerator for CNNs in mind).I see that torch itself has basic support for integer Tensors (ByteTensor, LongTensor, CudaByteTensor, CudaLongTensor, ...).But it seems like nn (and cunn) only support Float/Double Tensors:Spatial Convolution with FloatTensor works just fine:nn.SpatialConvolution(1,3,3,3):type('torch.FloatTensor'):forward(torch.FloatTensor(1,1,5,5))... (correct output)Spatial Convolution with ByteTensor fails:nn.SpatialConvolution(1,3,3,3):type('torch.ByteTensor'):forward(torch.ByteTensor(1,1,5,5))... (error: torch/install/share/lua/5.1/nn/SpatialConvolution.lua:100: attempt to index field 'THNN' (a nil value).)Looks like the THNN backend functions are missing for ByteTensor & co.Has anyone ever worked with fixed-point numbers in torch/nn?Are there any plans on supporting this?Best regards,David
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/NDhE1ER17sA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+unsubscribe@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+unsubscribe@googlegroups.com.