im试图设计一种可以产生漂亮模因的NN。
模因可以通过模块化方法生成。
以下模块可用:"mAdapter is 0, no item results"
我尝试了一个随机但经过标签过滤的列表。 -示例:
"No Results"
此元素是针对特殊的“问题”(例如“街道烦人”)生成的
我的testData生成器输出一个带有示例的列表,例如:“街道,烦人的$ pelican,汽车”
我将所有具有2个或更多true的元素过滤为一个模因中已经存在的元素之一,因此我有一个随机列表,这些列表不属于同一主观类别。
LSTM无法中继工作,我认为这是因为lstm必须“重新设计”所有的“ @Override
public boolean onQueryTextChange(String query) {
//items is the complete list of the category names available to the logged-in user
items = new Gson().fromJson(the_response, new TypeToken<List<Category>>() {
}.getType());
//clear the list every time a key is pressed
categoryList.clear();
//was getting NullPointerException so put this here...
if (items != null && items.size() > 0) {
//adding categories to category list
categoryList.addAll(items);
}
mAdapter.getFilter().filter(query);
recyclerView.setAdapter(mAdapter);
if (mAdapter.getItemCount() < 1) {
//if there's nothing to show, hide recyclerView...
recyclerView.setVisibility(View.GONE);
//and show the "No Results" textbox
noResultsFoundView.setVisibility(View.VISIBLE);
Toast.makeText(getApplicationContext(), "mAdapter is 0, no item results", Toast.LENGTH_SHORT).show();
}
if (mAdapter.getItemCount() >= 1) {
recyclerView.setVisibility(View.VISIBLE);
noResultsFoundView.setVisibility(View.GONE);
//if there ARE category results for what is typed, with each key press...
Toast.makeText(getApplicationContext(), "mAdapter size is:" + mAdapter.getItemCount(), Toast.LENGTH_SHORT).show();
}
//if the searchView is empty
if (searchView.getQuery().length() == 0) {
//show the logged-in users reviews, not the searched categories
recyclerView.setAdapter(pAdapter);
pAdapter.notifyDataSetChanged();
//show the recyclerview, hide the noResults textview
recyclerView.setVisibility(View.VISIBLE);
noResultsFoundView.setVisibility(View.GONE);
}
// refreshing recycler view
mAdapter.notifyDataSetChanged();
return false;
}
”。
现在问问题:
如何为LSTM提供此静态数据? 我不想只将其放入输入中,因为它似乎效率不高。
也许有更好的方法可以做到这一点。
非常感谢您提出任何建议。