启动netbeans时出错

时间:2017-06-28 07:48:34

标签: java netbeans netbeans-8

我在启动netbeans时遇到错误,因为权限被拒绝访问。 我将所有者和权限更改为〜/ .netbeans和安装文件夹,但我仍然遇到相同的错误。

from keras.datasets import cifar10
from keras.utils import *
from keras.optimizers import SGD
from keras.layers import Input,Dense
from keras.preprocessing.image import ImageDataGenerator
import cv2

train_datagen = ImageDataGenerator(
    rescale=1./255,
    shear_range=0.2,
    zoom_range=0.2,
    horizontal_flip=True)

test_datagen = ImageDataGenerator(rescale=1./255)

train_generator = train_datagen.flow_from_directory(
    'dataset/train',
    target_size=(64, 64),
    batch_size=32,
    class_mode='binary')

validation_generator = test_datagen.flow_from_directory(
    'dataset/evaluate',
    target_size=(64, 64),
    batch_size=32,
    class_mode='binary')


from keras.applications.vgg16 import VGG16
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input
from keras.models import Model
import numpy as np


input_shape=(64, 64, 3)

inputs = Input(shape=(64,64,3))

base_model = VGG16(weights=None, include_top=False, input_shape=input_shape)
x = base_model.output
x = Flatten(input_shape=model.output_shape[1:])(x)
x = Dense(256, activation='relu')
x = Dropout(0.5)(x)
x = Dense(1, activation='sigmoid')(x)
x = Dense(1, activation='sigmoid', name='predictions')(x)
model = Model(base_model.input , x)
model.compile(optimizer='sgd', loss='binary_crossentropy', metrics=   ['accuracy']) 


#train_generator = np.asarray(train_generator)
#validation_generator = np.asarray(validation_generator)
validation_generator = np.expand_dims(validation_generator, axis=2)
validation_generator = np.expand_dims(validation_generator, axis=3)

model.fit_generator(
        train_generator,
        steps_per_epoch=2000,
        epochs=50,
        validation_data=validation_generator,
        validation_steps=800)

我还能做什么?

错误日志netbeans

sudo chown -R user ~/.netbeans
sudo chmod -R +rw /opt/netbeans

1 个答案:

答案 0 :(得分:1)

从root用户,我尝试以下操作(更改为实际用户homedir):

rm -rf /home/user/.netbeans /home/user/.cache/netbeans