This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| # Callback function to check model accuracy | |
| class RayCallback(tf.keras.callbacks.Callback): | |
| def on_epoch_end(self, epoch, logs={}): | |
| if(logs.get('accuracy')>0.998): | |
| print("\nReached 99.8% accuracy so cancelling training!") | |
| self.model.stop_training = True | |
| # Load the MNIST handwrite digit data set |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Epoch 1/15 | |
| 1875/1875 [==============================] - 3s 2ms/step - loss: 0.2570 - accuracy: 0.9265 | |
| Epoch 2/15 | |
| 1875/1875 [==============================] - 4s 2ms/step - loss: 0.1133 - accuracy: 0.9667 | |
| Epoch 3/15 | |
| 1875/1875 [==============================] - 3s 2ms/step - loss: 0.0778 - accuracy: 0.9765 | |
| Epoch 4/15 | |
| 1875/1875 [==============================] - 3s 2ms/step - loss: 0.0580 - accuracy: 0.9822 | |
| Epoch 5/15 | |
| 1875/1875 [==============================] - 3s 2ms/step - loss: 0.0444 - accuracy: 0.9859 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| # Callback function to check model accuracy | |
| class RayCallback(tf.keras.callbacks.Callback): | |
| def on_epoch_end(self, epoch, logs={}): | |
| if(logs.get('accuracy')>0.99): | |
| print("\nReached 99% accuracy so cancelling training!") | |
| self.model.stop_training = True | |
| # Load the MNIST handwrite digit data set |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| iport numpy as np | |
| from tensorflow import keras | |
| # Create an 1*1 layer neuron | |
| model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])]) | |
| # Setting optimizer and loss function | |
| model.compile(optimizer='sgd', loss='mean_squared_error') | |
| # Training data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| utils.importFile("../../../../../src/common/cc26xx/kernel/cc2640/config/cc2640.cfg"); | |
| /* | |
| * Extend the cc2640 configuration | |
| */ | |
| var SysStd = xdc.useModule("xdc.runtime.SysStd"); | |
| var System = xdc.useModule("xdc.runtime.System"); | |
| System.SupportProxy = SysStd; | |
| System.extendedFormats = '%$L%$S%$F%f'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int 8_t b = -10; // b = 0xf6 for 2's complement | |
| b = b << 1; // b=0xec | |
| b = b >> 1; // Now b = 0x76 and for demical b = 118 unexpect ouput | |
| // The correct way to do that operation | |
| b = b&0x80 | b>>1;// b = 0xf6 for demical b = 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int 8_t b = -10; // b = 0xf6 for 2's complement | |
| b = b << 1; // b=0xec | |
| b = b >> 1; // Now b = 0x76 and for demical b = 118 unexpect ouput |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python C:\Python27\Scripts\hexmerge.py -o .\SOMETHING_MERGED.hex -r 0000:1FFFF .\SOMETHING_APP.hex:0000:1FFFF .\SOMETHING_STACK.hex --overlap=error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2017 The Walk Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "time" | |
| "golang.org/x/sys/windows/registry" | |
| ) |
NewerOlder