microsoft / edgeml Goto Github PK
View Code? Open in Web Editor NEWThis repository provides code for machine learning algorithms for edge devices developed at Microsoft Research India.
License: Other
This repository provides code for machine learning algorithms for edge devices developed at Microsoft Research India.
License: Other
Would it be possible to remove the spaces at the end of each option. ProtoNN script has removed it.
Remove hardcodings of file paths
std::ifstream ifs("/home/t-vekusu/ICMLDatasets/multiclass/mnist/train");
#pragma comment(lib, "../../../../Libraries/MKL/Win/Microsoft.MachineLearning.MklImports.lib")
The link to the EMI-RNN paper is invalid. Thanks.
Hi,
Thank you for this great work. I am curious about how to apply EdgeML to extreme multi-label classification problems. Your documentation for ProtoNN Wiki and paper suggests that it is a good fit but it is not clear how to get started with that. In the C++ code, what should the data format be for multi-label problems? In the tensorflow versions, how should the model be updated to apply it to multi-label problems (how to define the loss and output layer, etc..). Also, is only ProtoNN suitable for XML problems, or can the other algorithms be adapted too?
Cheers!
fastTrainer. and fastcell_example of the harsha/reorg branch seem to be out of date and need to be updated or removed.
@harsha-simhadri I think thes file needs to be removed once your fastmodel is robust.
@metastableB and @chogba, the Notebook doesn't run out of the box, there is dimensionality mismatch in the dataset and the core utility. Please fix it.
Method saveMeanStd(mean, std, currDir):
Line number 267, 268 is:
np.save(os.path.join(dataDir, 'mean.npy'), mean)
np.save(os.path.join(dataDir, 'std.npy'), std)
Error: variable dataDir is undefined.
I guess it has to be:
np.save(os.path.join(currDir, 'mean.npy'), mean)
np.save(os.path.join(currDir, 'std.npy'), std)
Shall I raise a PR?
I'm working on using the X86 backend instead of the Arduino backend for the SeeDot compiler. Edit: Here I'm using ProtoNN. I'm able to generate C++ code, but I get a segmentation fault on the following line in seedot_fixed.cpp
:
SparseMatMul(&Zidx[0], &Zval[0], X, &tmp6[0][0], 257, 128, 128, 2);
If I instead use 256, such that the line then becomes
SparseMatMul(&Zidx[0], &Zval[0], X, &tmp6[0][0], 256, 128, 128, 2);
then it works.
If we then assume that I have generated an executable called main
and run this with the following command
./main protonn fixed training
then I get the following output
#test points = 2007
Correct predictions = 352
Accuracy = 17.539
although, at the end of the training, I'm presented with the following output
Execution...success
Accuracy is 89.537%
Edit: If I use Bonsai instead of ProtoNN, I get an accuracy of 26,5% (instead of 17,5% like above). And the segmentation fault is gone.
Some questions:
SeeDot.py
and main.py
in the seedot
directory, as it was quite hardcoded for the Arduino platform.@metastableB , in the process_google.py file, I think the right way to create multiple versions of the datasets with different classes should be based on the classes listed in the labelmap rather than including everything and combining the not-required classes to 0. I think this should be chaged to support, say, simple things like google-30 where the classes are only the 30 keywords and no noise.
https://github.com/microsoft/EdgeML/blob/pytorch/pytorch/examples/SRNN/process_google.py#L35.
Leaving this issue here to keep track of developments.
Hello, Development Team! Thank you shared the algorithm ,but how to porting the algorithm to run at arduino or microbit board! Thanks!
Hello, I have a brief question about the results in the NIPS paper.
Did you use seeDot to generate the fastRNN/fastGRNN on Arduino, or is it something that you built from scratch and it is not yet available on the repo?
Thank you.
The the data produced at the end does not match the data used in publication in terms of the number of data points at least.
Hello, I trained a model in Bonsai and a ProtoNN using the python codes presented in the examples. I would like to know if there is a way to only predict results in python with the trained model.
-D 0 currently throws a lot of MKl warnings. Need to fix it.
I have tried to run Bonsai and ProtoNN on Raspberry Pi 3.
But, there was a problem with MKL installation.
MKL only runs on the Intel processor not ARM processor.
You guys mentioned that you've tested on Arduino Uno,
but I wonder how that is possible.
Looking at your paper "Resource-efficient Machine Learning in 2 KB RAM for the Internet of Things," it isn't clear to me how you set up the experiments for CUReT and Chars.
For example, for CUReT, Table 1 lists the total number of images as 4204 + 1403 = 5607, but if one downloads the dataset from http://www.robots.ox.ac.uk/~vgg/research/texclass/, the number of images is 5612.
The setup for the Chars dataset is also unclear to me. Table 1 lists the total number of images as 4397 + 1886 = 6283, but downloading the dataset from http://www.ee.surrey.ac.uk/CVSSP/demos/chars74k/, the number of images is 7705.
Can you please specify how you ran these experiments such that we can have a fair comparison with the algorithm proposed in your paper?
We should remove logging code in altMinSGD and perhaps pass a callback.
same goes for train()
Please have a look. Also, argparse
support for the python example.
Have an equivalent bat file similar to the sh file for running protonn/bonsai test.
Move the serialization code out of Bonsai model. One option is to have a serialization base class and different strategies for custom export which takes in a Bonsai model.
The script process_google.py reads all the .wav in a numpy array which might cause a memory error on many systems.
Either use of disk storage through numpy.memmap
or storing array as .HDF5
with PyTables
or use of some library like Pandas might solve this issue.
Is there any way of providing more cells to the FastCellTrainer or does it only work with one cell?
Hello, I am working on cross compiling ProtoNNPredict for a Mips device. It is the Onion Omega 2+ - an MT7688 device. It hangs when the model file, "test.txt," is memory mapped and is being read and interpreted. It has been hard to debug this issue without knowing exactly how the parser works. Can you explain it to me based on the problem variables index_value and labelValue?
So, this is just a general curiosity question from someone who at best may fool with this library on his Arduino's at some point.
I found this repo through this article on Bonsai, which linked to the paper.
The part where it mentioned that 8-bit fixed point math was used to avoid floating point overhead stuck me as interesting. I can only assume that this comes with trade-offs, but I know next to nothing of Machine Learning, so have no idea of what those are.
However, it just made me wonder if you were aware of posits (which come in 8-bit variants as well), and how they would fit in this picture.
Cheers,
Job
Hello!
I am using the SeeDot to generate the code for the Arduino and I have some questions regarding the Arduino Sketch.
1.) Where do the test values in array X stored in devices' flash memory come from?
2.) How do the input values need to be presented? I am using Bonsai to create the model, the training and test data in presented as integer values. When using the Arduino sketch, do the input values need to be scaled? If so, which scaling factor should be used? The data stored in array X has different values than any training-/testdata used to create the model.
Thank you very much!
@sridhargopinath and @ShishirPatil please change the main readme accordingly.
IHT routine fails in BonsaiTrainer due to use of np.copy() on Torch tensor.
Epoch Number: 32
Classification Train Loss: 0.1960460032439894
Training accuracy (Classification): 0.9822221928172641
Test accuracy 0.931241
MarginLoss + RegLoss: 0.18808786571025848 + 0.13880659639835358 = 0.32689446210861206
Epoch Number: 33
Traceback (most recent call last):
File "bonsai_example.py", line 94, in <module>
main()
File "bonsai_example.py", line 89, in main
dataDir, currDir)
File "/home/pushkalkatara/pytorch/lib/python3.5/site-packages/edgeml-0.2.1-py3.5.egg/edgeml_pytorch/trainer/bonsaiTrainer.py", line 337, in train
File "/home/pushkalkatara/pytorch/lib/python3.5/site-packages/edgeml-0.2.1-py3.5.egg/edgeml_pytorch/trainer/bonsaiTrainer.py", line 129, in runHardThrsd
File "/home/pushkalkatara/pytorch/lib/python3.5/site-packages/numpy/lib/function_base.py", line 792, in copy
return array(a, order=order, copy=True)
File "/home/pushkalkatara/pytorch/lib/python3.5/site-packages/torch/tensor.py", line 458, in __array__
return self.numpy()
RuntimeError: Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-a98b2336be21> in <module>()
12 print("y_cap shape is:", y_cap.shape)
13
---> 14 emiTrainer(y_cap, y_batch)
/Users/jacobrosenthal/Downloads/EdgeML/tf/edgeml/trainer/emirnnTrainer.py in __call__(self, predicted, target)
101 assert self.trainOp is not None
102 return self.lossOp, self.trainOp
--> 103 self.__validateInit(predicted, target)
104 assert self.__validInit is True
105 if self.graph is None:
/Users/jacobrosenthal/Downloads/EdgeML/tf/edgeml/trainer/emirnnTrainer.py in __validateInit(self, predicted, target)
76 def __validateInit(self, predicted, target):
77 msg = 'Predicted/Target tensors have incorrect dimension'
---> 78 assert len(predicted.shape) == 4, msg
79 assert predicted.shape[3] == self.numOutput, msg
80 assert predicted.shape[2] == self.numTimeSteps, msg
/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py in __len__(self)
482 """Returns the rank of this shape, or raises ValueError if unspecified."""
483 if self._dims is None:
--> 484 raise ValueError("Cannot take the length of Shape with unknown rank.")
485 return len(self._dims)
486
ValueError: Cannot take the length of Shape with unknown rank.
Hello. I plan to try this paper on on a microcontroller and I wonder if you have documentation about loading the model/predict code on a ATmega328P.
I have everything compiled and working on a PC and while I saw the pull request for Arduino, I would like to do this without their IDE
There is a simple issue in the script that runs ProtoNNPredict on the example data set. I have highlighted the issue in the image I provided: the number of iterations is supposed to be 20 and not 2. Please fix this in one of the next commits so that it will run immediately after cloning the project and building it.
Hi, I'm using protonn with the seedot tool for my C program but I have some doubts regarding the tool.
Hi,
Couple of questions on applying Bonsai on CIFAR10, referring to your paper @ http://harsha-simhadri.org/EdgeML/files/Bonsai.pdf
Table 1 refers to a dataset called CIFAR10-2. What does the -2 signify and is this dataset the same as
the one from https://www.cs.toronto.edu/~kriz/cifar.html ?
The reason I ask is because Table 1 lists the number of features as 400 whereas CIFAR10 features should 32x32x3=3072.
Would it be possible for you to share Bonsai training parameters for CIFAR10, similar to the USPS scripts in your repository ?
Thanks !
Hello, Development Team! I was trying the new SeeDot tool, following the example provided, but when I use the command:
python SeeDot.py -a protonn --train ../../tf/examples/ProtoNN/usps10/train.npy --test ../../tf/examples/ProtoNN/usps10/test.npy --model ../../tf/examples/ProtoNN/usps10/output -o arduino
give me a error.
I am using environment python 3.5
Packages: Antrl4 4.7.2, Numpy 1.16.2, Scikit-learn 0.20.3, jupyter 1.0.0, numpy 1.14.5, pandas 0.23.4, scipy 1.1.0, tensorflow 1.12.2.
Ubuntu 16.04 with Gcc 1.7.4 and make 4.1.
The Output of the command:
Train file: ../../tf/examples/ProtoNN/usps10/train.npy
Test file: ../../tf/examples/ProtoNN/usps10/test.npy
Model directory: ../../tf/examples/ProtoNN/usps10/output
Generating input files for float training dataset...done
Build...success
Execution...success
Accuracy is 94.787%
Generating input files for fixed training dataset...done
Testing with max scale factor of 0
Generating code...failed!
Testing with max scale factor of -1
Generating code...completed
seedot_fixed.cpp: In function ‘int seedotFixed(MYINT**)’:
seedot_fixed.cpp:44:69: error: invalid conversion from ‘int’ to ‘const MYINT* {aka const short int*}’ [-fpermissive]
SparseMatMul(&Widx[0], 256, X, 128, 128, &tmp5[0][0], 128, &Wval[0]);
^
In file included from seedot_fixed.cpp:7:0:
library.h:18:6: note: initializing argument 2 of ‘void SparseMatMul(const MYINT*, const MYINT*, MYINT**, MYINT*, MYINT, MYINT, MYINT, MYINT)’
void SparseMatMul(const MYINT Aidx, const MYINT Aval, MYINT B, MYINT C, MYINT K, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~~~~~~~
seedot_fixed.cpp:44:69: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
SparseMatMul(&Widx[0], 256, X, 128, 128, &tmp5[0][0], 128, &Wval[0]);
^
In file included from seedot_fixed.cpp:7:0:
library.h:18:6: note: initializing argument 4 of ‘void SparseMatMul(const MYINT, const MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT)’
void SparseMatMul(const MYINT Aidx, const MYINT Aval, MYINT B, MYINT C, MYINT K, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~~~~~~~
seedot_fixed.cpp:44:43: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
SparseMatMul(&Widx[0], 256, X, 128, 128, &tmp5[0][0], 128, &Wval[0]);
^~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:18:6: note: initializing argument 6 of ‘void SparseMatMul(const MYINT, const MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT)’
void SparseMatMul(const MYINT Aidx, const MYINT Aval, MYINT B, MYINT C, MYINT K, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~~~~~~~
seedot_fixed.cpp:44:61: error: invalid conversion from ‘const MYINT {aka const short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
SparseMatMul(&Widx[0], 256, X, 128, 128, &tmp5[0][0], 128, &Wval[0]);
^~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:18:6: note: initializing argument 8 of ‘void SparseMatMul(const MYINT, const MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT)’
void SparseMatMul(const MYINT Aidx, const MYINT Aval, MYINT B, MYINT C, MYINT K, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~~~~~~~
seedot_fixed.cpp:51:10: error: invalid conversion from ‘const MYINT {aka const short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
MatSub(&B[i][0][0], 1, &tmp6[0][0], 1, 25, 128, 1, &tmp5[0][0]);
^~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:8:6: note: initializing argument 1 of ‘void MatSub(MYINT, const MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatSub(MYINT A, const MYINT B, MYINT C, MYINT I, MYINT J, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~
seedot_fixed.cpp:51:65: error: invalid conversion from ‘int’ to ‘const MYINT {aka const short int}’ [-fpermissive]
MatSub(&B[i][0][0], 1, &tmp6[0][0], 1, 25, 128, 1, &tmp5[0][0]);
^
In file included from seedot_fixed.cpp:7:0:
library.h:8:6: note: initializing argument 2 of ‘void MatSub(MYINT, const MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatSub(MYINT A, const MYINT B, MYINT C, MYINT I, MYINT J, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~
seedot_fixed.cpp:51:54: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
MatSub(&B[i][0][0], 1, &tmp6[0][0], 1, 25, 128, 1, &tmp5[0][0]);
^~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:8:6: note: initializing argument 8 of ‘void MatSub(MYINT, const MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatSub(MYINT A, const MYINT B, MYINT C, MYINT I, MYINT J, MYINT shrA, MYINT shrB, MYINT shrC);
^~~~~~
seedot_fixed.cpp:56:44: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
Transpose(25, &tmp8[0][0], &tmp6[0][0], 1);
^
In file included from seedot_fixed.cpp:7:0:
library.h:26:6: note: initializing argument 1 of ‘void Transpose(MYINT, MYINT*, MYINT, MYINT)’
void Transpose(MYINT A, MYINT B, MYINT I, MYINT J);
^~~~~~~~~
seedot_fixed.cpp:56:30: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
Transpose(25, &tmp8[0][0], &tmp6[0][0], 1);
^~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:26:6: note: initializing argument 3 of ‘void Transpose(MYINT*, MYINT*, MYINT, MYINT)’
void Transpose(MYINT A, MYINT B, MYINT I, MYINT J);
^~~~~~~~~
seedot_fixed.cpp:60:82: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
tMulNN(&tmp6[0][0], 4, 5, &tmp10[0][0], 1, &tmp8[0][0], 1, 25, 2, &tmp9[0], 0);
^
In file included from seedot_fixed.cpp:7:0:
library.h:10:6: note: initializing argument 2 of ‘void MatMulNN(MYINT*, MYINT*, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulNN(MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:60:82: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
tMulNN(&tmp6[0][0], 4, 5, &tmp10[0][0], 1, &tmp8[0][0], 1, 25, 2, &tmp9[0], 0);
^
In file included from seedot_fixed.cpp:7:0:
library.h:10:6: note: initializing argument 3 of ‘void MatMulNN(MYINT, MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulNN(MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:60:48: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
MatMulNN(&tmp6[0][0], 4, 5, &tmp10[0][0], 1, &tmp8[0][0], 1, 25, 2, &tmp9[0], 0);
^~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:10:6: note: initializing argument 6 of ‘void MatMulNN(MYINT, MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulNN(MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:60:71: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
MatMulNN(&tmp6[0][0], 4, 5, &tmp10[0][0], 1, &tmp8[0][0], 1, 25, 2, &tmp9[0], 0);
^~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:10:6: note: initializing argument 10 of ‘void MatMulNN(MYINT, MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulNN(MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:64:62: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
ScalarMul(128, &tmp10[0][0], &tmp11[0][0], &tmp7, 1, 128, 1);
^
In file included from seedot_fixed.cpp:7:0:
library.h:28:6: note: initializing argument 1 of ‘void ScalarMul(MYINT, MYINT, MYINT*, MYINT, MYINT, MYINT, MYINT)’
void ScalarMul(MYINT A, MYINT B, MYINT C, MYINT I, MYINT J, MYINT shrA, MYINT shrB);
^~~~~~~~~
seedot_fixed.cpp:64:46: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
ScalarMul(128, &tmp10[0][0], &tmp11[0][0], &tmp7, 1, 128, 1);
^~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:28:6: note: initializing argument 4 of ‘void ScalarMul(MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT)’
void ScalarMul(MYINT A, MYINT B, MYINT C, MYINT I, MYINT J, MYINT shrA, MYINT shrB);
^~~~~~~~~
seedot_fixed.cpp:79:88: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
(&Z[i][0][0], 0, 128, &tmp16[0], 0, 10, 1, &tmp17[0][0], &tmp15[0][0], 128, 1);
^
In file included from seedot_fixed.cpp:7:0:
library.h:12:6: note: initializing argument 3 of ‘void MatMulCN(const MYINT, MYINT*, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulCN(const MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:79:54: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
MatMulCN(&Z[i][0][0], 0, 128, &tmp16[0], 0, 10, 1, &tmp17[0][0], &tmp15[0][0], 128, 1);
^~~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:12:6: note: initializing argument 8 of ‘void MatMulCN(const MYINT, MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulCN(const MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:79:68: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
MatMulCN(&Z[i][0][0], 0, 128, &tmp16[0], 0, 10, 1, &tmp17[0][0], &tmp15[0][0], 128, 1);
^~~~~~~~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:12:6: note: initializing argument 9 of ‘void MatMulCN(const MYINT, MYINT, MYINT*, MYINT*, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT, MYINT)’
void MatMulCN(const MYINT A, MYINT B, MYINT C, MYINT tmp, MYINT I, MYINT K, MYINT J, MYINT shrA, MYINT shrB, MYINT H1, MYINT H2);
^~~~~~~~
seedot_fixed.cpp:90:36: error: invalid conversion from ‘int’ to ‘MYINT {aka short int}’ [-fpermissive]
ArgMax(1, &tmp19, 10, &tmp18[0][0]);
^
In file included from seedot_fixed.cpp:7:0:
library.h:24:6: note: initializing argument 1 of ‘void ArgMax(MYINT, MYINT, MYINT, MYINT)’
void ArgMax(MYINT A, MYINT I, MYINT J, MYINT index);
^~~~~~
seedot_fixed.cpp:90:12: error: invalid conversion from ‘MYINT {aka short int}’ to ‘MYINT {aka short int}’ [-fpermissive]
ArgMax(1, &tmp19, 10, &tmp18[0][0]);
^~~~~~
In file included from seedot_fixed.cpp:7:0:
library.h:24:6: note: initializing argument 2 of ‘void ArgMax(MYINT*, MYINT, MYINT, MYINT*)’
void ArgMax(MYINT *A, MYINT I, MYINT J, MYINT *index);
^~~~~~
make: *** [seedot_fixed.o] Error 1
Build...success
Execution...success
Traceback (most recent call last):
File "SeeDot.py", line 94, in
obj.run()
File "SeeDot.py", line 89, in run
obj.run()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/main.py", line 325, in run
return self.runForFixed()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/main.py", line 260, in runForFixed
res = self.findBestScalingFactor()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/main.py", line 185, in findBestScalingFactor
res = self.performSearch()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/main.py", line 136, in performSearch
Common.Version.Fixed, Common.DatasetType.Training, Common.Target.X86, i)
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/main.py", line 118, in runOnce
acc = self.predict(version, datasetType)
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/main.py", line 106, in predict
acc = obj.run()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/predictor.py", line 128, in run
acc = self.execute()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/predictor.py", line 109, in execute
return self.executeForLinux()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/predictor.py", line 102, in executeForLinux
acc = self.readStatsFile()
File "/home/nelsonmartins/EdgeML/Tools/SeeDot/seedot/predictor.py", line 121, in readStatsFile
return float(stats[0])
IndexError: list index out of range
I am trying to execute the ProtoNN algorithm on my ubuntu 16.04 machine. However, I am unable to interpret what inputs to provide to the code and in what format. Kindly provide a small instruction set on how to run ProtoNN for the training and testing data you specified in the readme.
Thanks
Ive been sitting on the sidelines hoping someone would tackle osx support but it hasnt happened yet, so heres my start
Jacobs-Air:~ jacobrosenthal$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Jacobs-Air:~ jacobrosenthal$
Yeah were clang masquerading on macosx, need gcc5
brew install gcc5
I already have it
Jacobs-Air:~ jacobrosenthal$ gcc-5 --version
gcc-5 (Homebrew GCC 5.5.0) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ah config.mk already uses with CC=g++-5
try to make
Jacobs-MacBook-Air:EdgeML jacobrosenthal$ make -j
In file included from utils.h:7:0,
from utils.cpp:4:
pre_processor.h:7:17: fatal error: mkl.h: No such file or directory
MKL doesnt appear to be in brew yet
was problematic on osx? maybe not now?
https://github.com/Homebrew/homebrew-science/issues/2840
I had to get that manually
https://software.intel.com/en-us/get-started-with-mkl-for-osx
thus in config.mk
MKL_ROOT=/opt/intel/mkl
and
and /opt/intel/mkl/lib/intel64/ becomes /opt/intel/mkl/lib/ everywhere
bunch of this
/opt/intel/mkl/include/mkl_service.h:30:20: fatal error: stdlib.h: No such file or directory
You probably wont need to, but my brewed gcc5 was broken, and I had to
brew remove gcc5 && brew install gcc5
Then in src/common/goldfoil.cpp feenableexcept isnt available
Some stuff about fixing that but ill comment it for now
https://stackoverflow.com/questions/247053/enabling-floating-point-interrupts-on-mac-os-x-intel
mmaped.cpp(247): warning C4244: 'argument': conversion from 'LABEL_TYPE' to 'Eigen::EigenBase::Index', possible loss of data
mmaped.cpp(258): warning C4018: '<': signed/unsigned mismatch
mmaped.cpp(267): warning C4018: '>=': signed/unsigned mismatch
mmaped.cpp(350): warning C4244: '=': conversion from 'LABEL_TYPE' to 'featureCount_t', possible loss of data
mmaped.cpp(371): warning C4018: '<=': signed/unsigned mismatch
mmaped.cpp(476): warning C4018: '<=': signed/unsigned mismatch
mmaped.cpp(566): warning C4018: '<=': signed/unsigned mismatch
mmaped.cpp(672): warning C4018: '<=': signed/unsigned mismatch
mmaped.cpp(761): warning C4018: '<=': signed/unsigned mismatch
utils.cpp(314): warning C4717: 'EdgeML::exportDenseMatrix': recursive on all control paths, function will cause runtime stack overflow
BonsaiIngestTest.cpp(33): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
BonsaiIngestTest.cpp(61): warning C4018: '<': signed/unsigned mismatch
BonsaiIngestTest.cpp(66): warning C4018: '<': signed/unsigned mismatch
BonsaiIngestTest.cpp(120): warning C4018: '<': signed/unsigned mismatch
BonsaiIngestTest.cpp(130): warning C4018: '<': signed/unsigned mismatch
BonsaiFunctions.cpp(838): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
Need to support Training routine on all sparse params for efficiency in XML dataset.
A bunch of directions call for loading from a test or train.npy file. The text seems to be a list of label featurenum:float ... and doing np.load on the .txt doesnt work as I get UnpicklingError
Any help?
Also what/where is CURET data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.