We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private void readVocab(File file) throws IOException { MapCount<String> mc = new MapCount<>(); try (BufferedReader br = new BufferedReader(new InputStreamReader( new FileInputStream(file)))) { String temp = null; while ((temp = br.readLine()) != null) { String[] split = temp.split(" "); trainWordsCount += split.length; for (String string : split) { mc.add(string); } } } for (Entry<String, Integer> element : mc.get().entrySet()) { wordMap.put(element.getKey(), new WordNeuron(element.getKey(), (double) element.getValue() / mc.size(), layerSize)); } }
其中的MapCount的size是否不应该用HashMap的size,而是应该用HashMap中所有value之和?
MapCount
HashMap
The text was updated successfully, but these errors were encountered:
No branches or pull requests
其中的
MapCount
的size是否不应该用HashMap
的size,而是应该用HashMap
中所有value之和?The text was updated successfully, but these errors were encountered: