Skip to content

Commit

Permalink
Remove dummy code from LSTMTrainer::InitTensorFlowNetwork
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jun 22, 2019
1 parent 12f63c6 commit ea20bf0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/training/lstmtrainer.cpp
Expand Up @@ -170,8 +170,8 @@ bool LSTMTrainer::InitNetwork(const STRING& network_spec, int append_index,

// Initializes a trainer from a serialized TFNetworkModel proto.
// Returns the global step of TensorFlow graph or 0 if failed.
int LSTMTrainer::InitTensorFlowNetwork(const std::string& tf_proto) {
#ifdef INCLUDE_TENSORFLOW
int LSTMTrainer::InitTensorFlowNetwork(const std::string& tf_proto) {
delete network_;
TFNetwork* tf_net = new TFNetwork("TensorFlow");
training_iteration_ = tf_net->InitFromProtoStr(tf_proto);
Expand All @@ -182,11 +182,8 @@ int LSTMTrainer::InitTensorFlowNetwork(const std::string& tf_proto) {
network_ = tf_net;
ASSERT_HOST(recoder_.code_range() == tf_net->num_classes());
return training_iteration_;
#else
tprintf("TensorFlow not compiled in! -DINCLUDE_TENSORFLOW\n");
return 0;
#endif
}
#endif

// Resets all the iteration counters for fine tuning or traininng a head,
// where we want the error reporting to reset.
Expand Down

0 comments on commit ea20bf0

Please sign in to comment.