akankshakshurai/cuda-error-resolution-analysis huggingface dataset:
Windows Compatible RNN-T

jafioti: <p>I’ve been spending the past few weeks working with ASR models, and so far I’ve managed to train a decent CTC model, start training a Seq2Seq model (takes too long to train), and I have been trying to get the RNN Transducer to work, but I haven’t found any implementation that works in Windows. Every implementation typically always uses WarpTransducer, which has no support for Windows. Has anybody made one, or know of one that will work?</p>
<p>Thanks in advance!</p>
Error: no matching function for call to custom class

wangxiang2713: <p>I tried to compiler Nvidia fastertransformer, i got so file when compiling custom c++ function, but got error when compiling custom c++ class:</p>
<pre><code class="lang-auto">error: no matching function for call to ‘torch::class_&lt;torch_ths::FasterTransformerEncoder&gt;::class_(const char [25])’
   torch::jit::class_&lt;torch_ths::FasterTransformerEncoder&gt;("FasterTransformerEncoder")
</code></pre>
<p>I searched for the reason, some search results told me it may be environment problem, but i don’t know the exact reason, my environment is:</p>
<ul>
<li>Pytorch 1.6</li>
<li>CUDA 10.2</li>
<li>GCC 7.5.0</li>
<li>CMake 3.18.0-rc3</li>
<li>Centos 7<br>
And -DCXX_STD=14 in cmake command</li>
</ul>

ptrblck: <p>The error seems to be created by a custom function, so you might get better help by creating an issue in their GitHub repository and ask the author, if she’s seen it before.</p>
<p>Could you post the links to your search results suggesting it’s an env issue?</p>

wangxiang2713: <p>Hi, thank you for  your response, and the author help me slove this problem.<br>
The result is the custom function for pytorch in nvidia docker is not same as which in public pytorch.</p>
transforms.ToTensor() Division by 255 doesn't work

Stefan_Modl: <p>Hello together,</p>
<p>At first: This is my first question at the forum and I am not a native speaker so please forgive me if I make some mistakes.</p>
<p>so here is my code:</p>
<blockquote>
<p>import…<br>
data = np.random.rand(3,3,1)*255<br>
print(data)</p>
</blockquote>
<blockquote>
<p>[[[244.41737097]<br>
[107.10737004]<br>
[ 58.35949555]]<br>
[[113.9660475 ]<br>
[219.29274698]<br>
[196.0943086 ]]<br>
[[226.91415229]<br>
[152.0496204 ]<br>
[ 20.19787269]]]</p>
</blockquote>
<blockquote>
<p>print(transforms.ToTensor()(data))</p>
</blockquote>
<blockquote>
<p>tensor([[[ 244.4174,  107.1074,   58.3595],<br>
[ 113.9660,  219.2927,  196.0943],<br>
[ 226.9142,  152.0496,   20.1979]]], dtype=torch.float64)</p>
</blockquote>
<p>The transpose is normal but there is no division with 255?<br>
What do i make wrong?</p>
<p>Thank you in front<br>
Stefan</p>

ptrblck: <p>Currently the division by <code>255.</code> is done, when the transformation assumes an image.<br>
Using a <code>np.array</code> this is done by checking against the <code>dtype</code>.<br>
If you pass a <code>np.uint8</code> array into the transformation, it will be scaled.<br>
You can find the line of code <a href="https://github.com/pytorch/vision/blob/master/torchvision/transforms/functional.py#L50">here</a>.</p>
<pre><code class="lang-python">data = np.array(np.random.rand(3, 3, 1) * 255., dtype=np.uint8)
transforms.ToTensor()(data)
</code></pre>

VCharatsidis: <p><a class="mention" href="/u/ptrblck">@ptrblck</a><br>
Hello, i noticed this strange thing some days ago.</p>
<p>When i use images /= 255 to make them between 0 and 1 my code works just fine.</p>
<p>If instead of images /= 255 i use</p>
<pre><code class="lang-auto">    X_copy = copy.deepcopy(images)
    X_copy = Variable(torch.FloatTensor(X_copy))

    trans = transforms.Compose([transforms.ToTensor()])

    for i in range(X_copy.shape[0]):
        a = F.to_pil_image(X_copy[i])
        X_copy[i] = trans(a)

    return X_copy`
</code></pre>
<p>Then my program trains for 8-40 epochs in cifar100 dataset. Then at some point the train error goes higher and the learning stops. I discovered this when i was trying to find the correct way to have my images between 0 and 1. Any idea why does this happen? Is my way to make images between 0 and 1 using ToTensor wrong?</p>

ptrblck: <p>Could you check, if <code>trans</code> creates the same output as your manual normalization?<br>
If that’s the case, how reproducible is this issue? E.g. if you run the manual approach with 10 different seeds vs. the <code>ToTensor</code> approach, is the second one always worse than the first use case?</p>