Open YUE-hash opened 5 years ago
This issue happens because you do not have enough data on data/TrainSamples/river/root_nodes_tfrecords/
. Each command generate one file, but during training, the ratio of validation is 0.1, which means you should generate more than 10 samples at least to avoid this empty data problem.
@chiangqiqi Do I need to run python generate_data.py --street 4 --approximate root_nodes
ython convert_npy_to_tfrecords.py --street 4 --approximate root_nodes ten times?
when I run python train_nn.py --street 4 --approximate root_nodes
Traceback (most recent call last):
File "train_nn.py", line 38, in
The issue arises you have not enough files in data/TrainSamples/river/root_nodes_tfrecords/
. You have to create more TF Record files. Just replace line self.tfrecords_batch_size = 1024*10
w/ for example self.tfrecords_batch_size = 64
in src/Settings/arguments.py
file, so it does create enough files and then run train_nn.py
.
Generated solved situations: river: 2mil., other rounds: 0.5mil 。 How much tfrecords can reach to 2 million?
You also will need to change self.batch_size = 1024
to something smaller like self.batch_size = 64
in src/Settings/arguments.py
to not get Empty training data
error.
@154461013 This means I solved 2 million situations in river round. So if self.tfrecords_batch_size
is 1024*10
, there is a total of 2,000,000/(1024*10)=196 tf record files in data/TrainSamples/river/root_nodes_tfrecords/
directory.
How long it will take to generate 2mil sovled situations with a normal ML setup?
When I finish the operation python generate_data.py --street 4 --approximate root_nodes python convert_npy_to_tfrecords.py --street 4 --approximate root_nodes It seems cannot run python train_nn.py --street 4 --approximate root_nodes because of ValueError: Empty training data.