zhongkaifu / Seq2SeqSharp

Seq2SeqSharp is a tensor based fast & flexible deep neural network framework written by .NET (C#). It has many highlighted features, such as automatic differentiation, different network types (Transformer, LSTM, BiLSTM and so on), multi-GPUs supported, cross-platforms (Windows, Linux, x86, x64, ARM), multimodal model for text and images and so on.
Other
197 stars 37 forks source link

CS1003 Syntax error, ',' expected TensorSharp D:\Seq2SeqSharp-master (1)\Seq2SeqSharp-master\TensorSharp\Cpu\CpuRandom.cs #12

Closed My-Khan closed 3 years ago

My-Khan commented 4 years ago

Hello Zhong First I appreciate the contribution, Previously I have used RNNSharp successfully for NER task, I am curious to apply this new version too, however, when I try to run it generates huge error list e.g "IntPtr is a type but is used like a variable" especially in TensorSharp project in the following line of code using (NativeWrapper.BuildTensorRefPtr(input_i, out IntPtr input_iPtr)) using (NativeWrapper.BuildTensorRefPtr(output_i, out IntPtr output_iPtr)) using (NativeWrapper.BuildTensorRefPtr(indices_i, out IntPtr indices_iPtr)) { CpuOpsNative.TS_SpatialMaxPooling_updateOutput_frame(input_iPtr, output_iPtr, indices_iPtr, Thanks in Advance

zhongkaifu commented 4 years ago

How did you run Seq2SeqSharp ? Can you please share command line (config file), sample of training corpus with me ? I can take a look.

My-Khan commented 4 years ago

Many Zhong Kai for considering my issue here is my command-line arguments and some images Train -WordVectorSize 512 -HiddenSize 512 -LearningRate 0.001 -ModelFilePath seq2seq.model -TrainCorpusPath D:\Seq2SeqSharp-master (1)\Demo Data\1Train.txt -ValidCorpusPath D:\Seq2SeqSharp-master (1)\Demo Data\1valid.txt -SrcLang ENU -TgtLang CHS -BatchSize 256 -ProcessorType CPU -EncoderType BiLSTM -EncoderLayerDepth 6 -DecoderLayerDepth 2 -MultiHeadNum 8 -DeviceIds 0,1,2,3,4,5,6,7

E3 E1 E2

zhongkaifu commented 3 years ago

Can you please try release package and see if it works for you.

My-Khan commented 3 years ago

Dear Zhong Many thanks i tried the new version , however when I try to load it VS 2015 it generates the below error messages:

  1. D:\Zhong\Seq2SeqSharp-master\TensorSharp\TensorSharp.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\Zhong\Seq2SeqSharp-master\TensorSharp\TensorSharp.csproj

D:\Zhong\Seq2SeqSharp-master\TensorSharp.CUDA\TensorSharp.CUDA.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\Zhong\Seq2SeqSharp-master\TensorSharp.CUDA\TensorSharp.CUDA.csproj

  1. D:\Zhong\Seq2SeqSharp-master\SeqLabelConsole\SeqLabelConsole.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\Zhong\Seq2SeqSharp-master\SeqLabelConsole\SeqLabelConsole.csproj

Below are the images

image

image

zhongkaifu commented 3 years ago

Thanks @My-Khan

The Seq2SeqSharp is built by Visual Studio 2019 and dotnet core. So it seems VS 2015 is too old to support it. You may try to open it by Visual Studio Community or Visual Studio Code. They are all free to download and use.