'I can't save the obtained model data and pictures, and it prompts one PIC error

The following is the data display during the training process: [ 1 Epoch:[ 0/25] [ 0/ 163] time: 1.6582, d_loss: 17.73454285, g_loss: 0.00000020 one pic error!...//i do not no why [ 2 Epoch:[ 0/25] [ 1/ 163] time: 2.0025, d_loss: 11.87505627, g_loss: 0.00000958

code '''

   try:
              samples, d_loss, g_loss = self.sess.run(
                [self.sampler, self.d_loss, self.g_loss],
                feed_dict={
                    self.z: sample_z,
                    self.inputs: sample_inputs,
                },
              )
              save_images(samples, image_manifold_size(samples.shape[0]),
                    './{}/train_{:08d}.png'.format(config.sample_dir, counter))
              print("[Sample] d_loss: %.8f, g_loss: %.8f" % (d_loss, g_loss)) 
            except:
              print("one pic error!...")

'''



Solution 1:[1]

When running main.py as an entrypoint, absolute path to directions is model.directions, and that is what needs to be in defined in the weirdo file import.

If you want to avoid specifying full path, you can use relative import in the form of from .directions import Direction in weirdo.py

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1