Exemple #1
0
        public void CantTrainSupervisedWithPretrainedVectorsWithDifferentDimension()
        {
            using var fastText = new FastTextWrapper(loggerFactory: _loggerFactory);

            string outPath = Path.Combine(_tempDir, "cooking");
            var    args    = new SupervisedArgs();

            args.PretrainedVectors = "cooking.unsup.300.vec";

            fastText.Invoking(x => x.Supervised("cooking.train.txt", outPath, args))
            .Should().Throw <NativeLibraryException>()
            .WithMessage("Dimension of pretrained vectors (300) does not match dimension (100)!");
        }