Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
merge latest lieonn, no logic chg on this.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsofcotton committed Apr 14, 2024
1 parent b3ce761 commit a72ac32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lieonn.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4178,7 +4178,7 @@ template <typename T> pair<pair<vector<SimpleVector<T> >, vector<T> >, pair<vect

template <typename T> pair<vector<vector<SimpleVector<T> > >, vector<vector<SimpleVector<T> > > > predVec(const vector<vector<SimpleVector<T> > >& in0, const int& cj = 11) {
assert(in0.size() && in0[0].size() && in0[0][0].size() && 0 < cj);
if(19683 < in0[0].size() * in0[0][0].size())
if(19683 * cj < in0[0].size() * in0[0][0].size())
cerr << "predVec : elements larger than 19683, exceeds function entropy." << endl;
vector<SimpleVector<T> > in;
in.resize(in0.size());
Expand All @@ -4201,8 +4201,8 @@ template <typename T> pair<vector<vector<SimpleVector<T> > >, vector<vector<Simp
res.first[i].resize(in0[0].size());
res.second[i].resize(in0[0].size());
for(int j = 0; j < res.first[i].size(); j ++) {
res.first[j].resize(in0[0][0].size());
res.second[j].resize(in0[0][0].size());
res.first[i][j].resize(in0[0][0].size());
res.second[i][j].resize(in0[0][0].size());
for(int k = 0; k < in0[0][0].size(); k ++) {
for(int m = 0; m < rres.size(); m ++)
rres[m] = p.first.first[i][j * in0[0][0].size() +
Expand All @@ -4226,10 +4226,10 @@ template <typename T> pair<vector<vector<SimpleVector<T> > >, vector<vector<Simp

template <typename T> pair<vector<vector<SimpleMatrix<T> > >, vector<vector<SimpleMatrix<T> > > > predMat(const vector<vector<SimpleMatrix<T> > >& in0, const int& cj = 11) {
assert(in0.size() && in0[0].size() && in0[0][0].rows() && in0[0][0].cols());
if(19683 < in0[0].size() * in0[0][0].rows() * in0[0][0].cols())
cerr << "predMat : elements larger than 19683, exceeds function entropy." << endl;
const int ccj(ceil(sqrt(T(cj))));
assert(0 < ccj);
if(ccj * ccj * 19683 < in0[0].size() * in0[0][0].rows() * in0[0][0].cols())
cerr << "predMat : elements larger than 19683, exceeds function entropy." << endl;
vector<SimpleVector<T> > in;
in.resize(in0.size());
for(int i = 0; i < in0.size(); i ++) {
Expand Down Expand Up @@ -4289,12 +4289,12 @@ template <typename T> pair<vector<vector<SimpleMatrix<T> > >, vector<vector<Simp

template <typename T> pair<vector<SimpleSparseTensor<T> >, vector<SimpleSparseTensor<T> > > predSTen(const vector<SimpleSparseTensor<T> >& in0, const vector<int>& idx, const int& cj = 11) {
assert(idx.size() && in0.size());
if(19683 < idx.size() * idx.size() * idx.size())
cerr << "predSTen : elements larger than 19683, exceeds function entropy." << endl;
// N.B.: we don't do input scaling.
// const int ccj(ceil(pow(T(cj), T(int(1)) / T(int(3)) )) );
const int ccj(1);
assert(0 < ccj);
if(ccj * ccj * ccj * 19683 < idx.size() * idx.size() * idx.size())
cerr << "predSTen : elements larger than 19683, exceeds function entropy." << endl;
// N.B. the data we target is especially string stream corpus.
// they are incontinuous one, so complementing with continuous stream
// shouldn't improve outputs.
Expand Down

0 comments on commit a72ac32

Please sign in to comment.