Added test for y
This commit is contained in:
parent
ca53eedece
commit
e4e111f029
|
@ -4,7 +4,7 @@
|
|||
<list default="true" id="8a8ba9af-e1a4-433a-9968-475192610776" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/character_based_ffnn_keras.ipynb" afterPath="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/character_based_ffnn_keras.ipynb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/v1/character_based_ffnn_keras.ipynb" afterPath="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/v1/character_based_ffnn_keras.ipynb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/prepare_data.py" afterPath="$PROJECT_DIR$/prepare_data.py" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
|
@ -31,11 +31,11 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="prepare_data.py" pinned="false" current-in-tab="false">
|
||||
<file leaf-file-name="prepare_data.py" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/prepare_data.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="5616">
|
||||
<caret line="318" column="23" lean-forward="false" selection-start-line="318" selection-start-column="23" selection-end-line="318" selection-end-column="23" />
|
||||
<state relative-caret-position="234">
|
||||
<caret line="93" column="32" lean-forward="true" selection-start-line="93" selection-start-column="32" selection-end-line="93" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#24#63#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<file leaf-file-name="workbench.py" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/workbench.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="666">
|
||||
<state relative-caret-position="396">
|
||||
<caret line="37" column="68" lean-forward="false" selection-start-line="37" selection-start-column="68" selection-end-line="37" selection-end-column="68" />
|
||||
<folding>
|
||||
<element signature="e#53#92#0" expanded="true" />
|
||||
|
@ -55,7 +55,7 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="character_based_ffnn_keras.ipynb" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="character_based_ffnn_keras.ipynb" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/character_based_ffnn_keras.ipynb">
|
||||
<provider selected="true" editor-type-id="ipnb-editor">
|
||||
<state>
|
||||
|
@ -161,10 +161,10 @@
|
|||
<option value="$PROJECT_DIR$/theano_tutorial/logistic_regression.py" />
|
||||
<option value="$PROJECT_DIR$/theano_tutorial/logistic_regression_loop.py" />
|
||||
<option value="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/cnn_test_on_other_attributes.ipynb" />
|
||||
<option value="$PROJECT_DIR$/prepare_data.py" />
|
||||
<option value="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/character_based_ffnn_keras.py" />
|
||||
<option value="$PROJECT_DIR$/workbench.py" />
|
||||
<option value="$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/character_based_ffnn_keras.ipynb" />
|
||||
<option value="$PROJECT_DIR$/prepare_data.py" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -871,8 +871,8 @@
|
|||
<entry file="file://$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/cnn_test_on_other_attributes.ipynb" />
|
||||
<entry file="file://$PROJECT_DIR$/prepare_data.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="5616">
|
||||
<caret line="318" column="23" lean-forward="false" selection-start-line="318" selection-start-column="23" selection-end-line="318" selection-end-column="23" />
|
||||
<state relative-caret-position="234">
|
||||
<caret line="93" column="32" lean-forward="true" selection-start-line="93" selection-start-column="32" selection-end-line="93" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#24#63#0" expanded="true" />
|
||||
</folding>
|
||||
|
@ -931,7 +931,7 @@
|
|||
<entry file="file://$PROJECT_DIR$/cnn/word_accetuation/cnn_dictionary/character_based_ffnn_keras.py" />
|
||||
<entry file="file://$PROJECT_DIR$/workbench.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="666">
|
||||
<state relative-caret-position="396">
|
||||
<caret line="37" column="68" lean-forward="false" selection-start-line="37" selection-start-column="68" selection-end-line="37" selection-end-column="68" />
|
||||
<folding>
|
||||
<element signature="e#53#92#0" expanded="true" />
|
||||
|
|
|
@ -79,24 +79,24 @@ def load_shuffle_vector(file_name):
|
|||
|
||||
|
||||
# functions for saving and loading model - ONLY WHERE KERAS IS NOT NEEDED
|
||||
def save_model(model, file_name):
|
||||
h5f = h5py.File(file_name, 'w')
|
||||
adict = dict(W1=model['W1'], b1=model['b1'], W2=model['W2'], b2=model['b2'])
|
||||
for k,v in adict.items():
|
||||
h5f.create_dataset(k,data=v)
|
||||
|
||||
h5f.close()
|
||||
|
||||
|
||||
def load_model(file_name):
|
||||
h5f = h5py.File(file_name,'r')
|
||||
model = {}
|
||||
W1.set_value(h5f['W1'][:])
|
||||
b1.set_value(h5f['b1'][:])
|
||||
W2.set_value(h5f['W2'][:])
|
||||
b2.set_value(h5f['b2'][:])
|
||||
h5f.close()
|
||||
return model
|
||||
# def save_model(model, file_name):
|
||||
# h5f = h5py.File(file_name, 'w')
|
||||
# adict = dict(W1=model['W1'], b1=model['b1'], W2=model['W2'], b2=model['b2'])
|
||||
# for k,v in adict.items():
|
||||
# h5f.create_dataset(k,data=v)
|
||||
#
|
||||
# h5f.close()
|
||||
#
|
||||
#
|
||||
# def load_model(file_name):
|
||||
# h5f = h5py.File(file_name,'r')
|
||||
# model = {}
|
||||
# W1.set_value(h5f['W1'][:])
|
||||
# b1.set_value(h5f['b1'][:])
|
||||
# W2.set_value(h5f['W2'][:])
|
||||
# b2.set_value(h5f['b2'][:])
|
||||
# h5f.close()
|
||||
# return model
|
||||
|
||||
# functions for creating X and y from content
|
||||
def read_content():
|
||||
|
|
Loading…
Reference in New Issue
Block a user