从GitHub上clone了一套keras实现fcn的代码,在运行train.py时出现了NotImplementedError。刚接触神经网络不久,这个是哪里出了问题呢?
代码如下:
import os
import yaml
import datetime
import numpy as np
import keras
import keras.backend as K
import tensorflow as tf
from keras_fcn import FCN
from voc_generator import PascalVocGenerator, ImageSetLoader
from keras.callbacks import (
ReduceLROnPlateau,
CSVLogger,
EarlyStopping,
ModelCheckpoint,
TerminateOnNaN)
from keras_fcn.callbacks import CheckNumericsOps
os.environ[“CUDA_VISIBLE_DEVICES”] = “-1”
global _SESSION
config = tf.ConfigProto(allow_soft_placement=True)
config.gpu_options.allow_growth = False
_SESSION = tf.Session(config=config)
K.set_session(_SESSION)
with open(“init_args.yml”, ‘r’) as stream:
try:
init_args = yaml.load(stream)
except yaml.YAMLError as e