Gradle : 4.10.1 Gradle Android Plugin version : 3.3.2 Proguard : 6.0.3 JDK - 1.9 Android Studio 3.3.2 When I try to build apk release version along with Proguard. I get the following error -
Caused by: java.io.IOException: Please correct the above warnings first.
at proguard.InputReader.execute(InputReader.java:149)
at proguard.ProGuard.readInput(ProGuard.java:255)
at proguard.ProGuard.execute(ProGuard.java:96)
......
Run Code Online (Sandbox Code Playgroud)
This seems to be caused due to this -
Warning: class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]
Note: duplicate definition of program class [module-info]
Note: there were 20 duplicate class …Run Code Online (Sandbox Code Playgroud) 我是 Keras 和机器学习的新手。我正在尝试使用 Sequential 模型构建一个二元分类模型。经过一些实验,我发现在多次运行中(并非总是如此),我在第二个或第三个时期本身的验证数据上获得了甚至 97% 的准确率,但这急剧下降到了 12%。这背后的原因是什么?如何微调我的模型?这是我的代码 -
model = Sequential()
model.add(Flatten(input_shape=(6,size)))
model.add(Dense(6,activation='relu'))
model.add(Dropout(0.35))
model.add(Dense(3,activation='relu'))
model.add(Dropout(0.1))
model.add(Dense(1,activation='sigmoid'))
model.compile(loss='binary_crossentropy',optimizer='adam',metrics=['binary_accuracy'])
model.fit(x, y,epochs=60,batch_size=40,validation_split=0.2)
Run Code Online (Sandbox Code Playgroud) public class Stringreverser {
public char[] reverse(String a){
char[] arre = a.toCharArray() ;
char[] result = {} ;
int count = 0 ;
for(int inarre = arre.length -1 ; inarre >= 0 ; inarre = inarre -1 ){
result[count] = arre[inarre] ;
count+= 1 ;
}
return result ;
}
public static void main(String argv[]){
System.out.println(new Stringreverser().reverse("hello")) ;
}
}
Run Code Online (Sandbox Code Playgroud)
这一直给我一个 -Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0错误。该程序应该接收一个字符串并反转并返回一个字符数组。问题似乎出在result[count] = arre[inarre] ;. 问题是什么 ?