张量流图构建期间的ValueError

时间:2019-01-28 23:44:12

标签: tensorflow machine-learning

我正在尝试使用张量流训练GAN,但是在图形构建期间出现此错误:

var Wrap = (function() {
  function User(name) {
    this.name = name;
  }

  User.prototype.thankForLoggingIn = function() {
    return "Thank you coming in " + this.name;
  };

  return User;
})();

var user1 = new Wrap("Adrian");
var user2 = new Wrap("John");

let greet1 = user1.thankForLoggingIn();
let greet2 = user2.thankForLoggingIn();

console.log(greet1);
console.log(greet2);

我猜这是因为我的鉴别器和生成器在我调用的不同函数中。理想情况下,我希望避免将整个体系结构从方法中分离出来,因为这将导致冗长的python文件。

在尝试通过sess.run()调用第一个训练示例之前,我尝试使用占位符的默认值,但这导致在训练的每个阶段都在图表中运行相同的示例(可能是因为就是tensorflow构造图的方式

我的训练循环代码如下。请让我知道,看看生成器和鉴别函数本身是否有帮助。

ValueError: Input 0 of layer conv1_1 is incompatible with the layer: its rank is undefined, but the layer requires a defined rank.

0 个答案:

没有答案