• S
    sddwt

    已经解决这个的问题了,
    但是现在发现训练过程

    loss: nan - accuracy: 0.0000e+00 - val_loss: nan - val_accuracy: 0.0000e+00
    

    没有修改网络,由于我缩减了分类到8个,请问该如何调整呢?

    发布在 社区求助区(SOS!!) 阅读更多
  • S
    sddwt

    另外,
    4096*3为12288,请问最后一通道怎么reshape呢?

    发布在 社区求助区(SOS!!) 阅读更多
  • S
    sddwt

    导出tfrecord时是正常的,
    take的时候就报错了,
    图片做了resize呀

    
    Traceback (most recent call last):
      File "train_simple.py", line 121, in <module>
        train()
      File "train_simple.py", line 49, in train
        for data in train_dataset.take(2):
      File "/usr/local/lib64/python3.6/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 747, in __next__
        return self._next_internal()
      File "/usr/local/lib64/python3.6/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 739, in _next_internal
        return structure.from_compatible_tensor_list(self._element_spec, ret)
      File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/local/lib64/python3.6/site-packages/tensorflow/python/eager/context.py", line 2116, in execution_mode
        executor_new.wait()
      File "/usr/local/lib64/python3.6/site-packages/tensorflow/python/eager/executor.py", line 69, in wait
        pywrap_tfe.TFE_ExecutorWaitForAllPendingNodes(self._handle)
    tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 12288 values, but the requested shape has 4096
             [[{{node Reshape}}]]
    
    

    resize取域:

                        # print(img.tobytes())
                        img = cv2.resize(img, (64, 64))
                        w = img.shape[0]
                        h = img.shape[1]
                        # cv2.imshow('', img)
    

    求大佬帮助!

    发布在 社区求助区(SOS!!) 阅读更多

与 神力AI社区 的连接断开,我们正在尝试重连,请耐心等待