Skip to content

Commit 7e47822

Browse files
authored
Merge pull request #101 from kba/fix-swig
Fix swig
2 parents 0dfde5f + d606a87 commit 7e47822

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

Diff for: SConstruct

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,16 @@ all += [env.Program("test-2d", ["test-2d.cc"], LIBS=[libclstm] + libs)]
150150
# You can construct the Python extension from scons using the `pyswig` target; however,
151151
# the recommended way of compiling it is with "python setup.py build"
152152

153-
swigenv = env.Clone(SWIGFLAGS=["-python", "-c++"], SHLIBPREFIX="")
153+
swigenv = env.Clone()
154154
swigenv.Tool("swig")
155155
swigenv.Append(SWIG="3.0")
156156
swigenv.Append(CPPPATH=[distutils.sysconfig.get_python_inc()])
157157
pyswig = swigenv.SharedLibrary("_clstm.so",
158158
["clstm.i", "clstm.cc", "clstm_proto.cc", "extras.cc",
159159
"clstm.pb.cc", "clstm_compute.cc",
160160
"clstm_prefab.cc", "ctc.cc"],
161+
SWIGFLAGS=['-python', '-c++'],
162+
SHLIBPREFIX="",
161163
LIBS=libs)
162164
Alias('pyswig', [pyswig])
163165

Diff for: clstm.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void walk_states(Network net, StateFun f, const string &prefix = "",
171171
void walk_networks(Network net, NetworkFun f, const string &prefix = "");
172172

173173
// output information about the network (for debugging)
174-
void network_info(Network net, string prefix = "");
174+
void network_info(Network net, string prefix);
175175
void network_detail(Network net, string prefix = "");
176176

177177
// get the number of parameters in a network

Diff for: clstmfiltertrain.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int main1(int argc, char **argv) {
8888
clstm.createBidi(icodec, codec, nhidden);
8989
clstm.setLearningRate(lrate, momentum);
9090
}
91-
network_info(clstm.net);
91+
network_info(clstm.net, "");
9292

9393
int ntrain = getienv("ntrain", 10000000);
9494
int save_every = getienv("save_every", 10000);

Diff for: clstmocrtrain.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ int main1(int argc, char **argv) {
115115
clstm.createBidi(codec.codec, getienv("nhidden", 100));
116116
clstm.setLearningRate(getdenv("lrate", 1e-4), getdenv("momentum", 0.9));
117117
}
118-
network_info(clstm.net);
118+
network_info(clstm.net, "");
119119

120120
double test_error = 9999.0;
121121
double best_error = 1e38;

0 commit comments

Comments
 (0)